const, final, scope function parameters

Frank Benoit keinfarbton at googlemail.com
Sun May 27 07:42:09 PDT 2007


Perhaps we look at it from the wrong side.

If we want to change the D language to make it more const, the keywords
'const', 'invariant'... are probably the wrong choice.

How about restricting keywords and add their opposites: 'mutable',
'once' (write once) and then make every variable declaration const by
default? Each variable/parameter needs to be made modifyable with
modifiers if needed.



More information about the Digitalmars-d mailing list