Who favors the current D1 situation?

Walter Bright newshound1 at digitalmars.com
Fri Mar 7 11:36:06 PST 2008


Bill Baxter wrote:
> Walter Bright wrote:
>> You can write bug-free and perfectly correct programs without const or 
>> invariant at all. But once a code base exceeds a certain level of size 
>> and complexity (and I don't know what that level is), const/invariant 
>> will become increasingly valuable. People who do work in large 
>> corporations managing extremely large codebases with legions of 
>> programmers working on them have made this abundantly clear to me.
> 
> Yes, they believe they need it.  Sure.  But I doubt many of them have 
> done any sort of analysis of how much it actually helps vs. how much it 
> complicates their code base.  I say this as someone who was totally sold 
> on C++ const for the first 10 years I used it.

C++ const is not too useful anyway, as it is not transitive and not 
invariant. It's more of a convention.

> Now I'm kind of used to not having it.  And, well, the sky hasn't 
> fallen.  But lots of my code has lost superfluous redundancy.
> 
> But I'm going to start trying to compile my code with D2 this weekend 
> and see how it goes.  Hopefully const will mostly stay out of my way.
> 
> --bb



More information about the Digitalmars-d mailing list