Do we need a time-out in D evolution?

Walter Bright newshound1 at digitalmars.com
Sun Jun 10 01:40:52 PDT 2007


eao197 wrote:
> A long time ago I had some expirience of modifying C++ code without 
> consts to code with consts. Main trouble was to identify methods which 
> must be declared as const -- it required full code review.

I suspect that it can be done by declaring all as const, then removing 
const from those that generate compile time errors. If you err on the 
side of adding too many const's, your program won't crash, it just won't 
compile.

I'll also argue that if a full code review was required, that the code 
documentation was either incomplete or unreliable. Having const will 
reduce the problem by bringing the documentation into the semantic 
information of the code, and so reduce the need for code reviews in the 
future.



More information about the Digitalmars-d mailing list