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

Georg Wrede georg at nospam.org
Tue Jun 12 04:39:48 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.

Most definitely 2.


Even if we didn't consider this an experiment, I'd still vehemently vote 
for 2. And now that we have this "D2 experimental branch" I simply 
cannot imagine a valid reason for not trying it out.

Of course, Phobos might require some man hours to compile, but hey, no 
pain no gain.


Amusingly, what makes (2) different from most other fundamental language 
changes is, this is intuitive and self-evident even to most programming 
novices.



More information about the Digitalmars-d mailing list