www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Poll: Would you like to try const-by-default or not?

Jarrett Billingsley Wrote:

 1) C++ style const, where you mark anything that should be const as such.
 
 2) Parameters are const-by-default, and must be marked mutable otherwise. 
 Locals, fields etc. are still mutable by default.

</lurk> As far as I am concerned 2 is the only thing that makes sense. Parameters are not variables as far as I am concerned. Variables should, of course, be 'variable' by default. More functional and functional-style programming awaits us if we clearly mark our side effects... </lurk>
Jun 12 2007