Poll: Would you like to try const-by-default or not?

sambeau (Sam Phillips) spam-sambeau at mac.com
Tue Jun 12 07:47:02 PDT 2007


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>



More information about the Digitalmars-d mailing list