Stick a fork in it

Johan Granberg lijat.meREM at OVEgmail.com
Sat May 12 04:24:29 PDT 2007


Deewiant wrote:

> renoX wrote:
>> While this makes it easy to remember, I can't help but thinking about
>> all these people who claims that functional programming is better..
>> 
>> If they're right then it should be totally the opposite:
>> invariants by default and if we want to have a variable then we have to
>> precise it..
>> 
> 
> Walter said once that he should have made const the default (this is
> before this const/final/invariant stuff, so just replace const with "any
> constant qualifier"). See the following Google Groups link, near the
> bottom of the post:
>
http://groups.google.com/group/comp.lang.c++.moderated/tree/browse_frm/thread/d6695737a74e1853/18dc841928a6eee3#doc_3ff8dedacef55e17
> 
> FWIW, I think it's still not too late, especially with the 2.0 fork there
> can't possibly be "[t]oo much water under the bridge". If the whole const
> system is being rewritten anyway, might as well bring in const by default.
> 

Yes, if we got immutability as a default it could catch a number of common
bugs.



More information about the Digitalmars-d-announce mailing list