www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Const sucks

Walter Bright Wrote:


 1) final (i.e. 'head const') is not necessary for a, b or c. final is a 
 local thing, and not strictly necessary.
 
 2) tail const can be handled in other ways, read on
 
 So, what we are left with is:
 
 o  no more final
 
 o  const and invariant now mean "fully const" and "fully invariant", 
 where fully means "head and tail combined":

If head const is not necessary, why not having const and invariant meaning 'tail const' and 'tail invariant' ? This way no need to design templates.
Sep 12 2007