preparing for const, final, and invariant
Walter Bright
newshound1 at digitalmars.com
Sat May 19 16:13:29 PDT 2007
Brad Roberts wrote:
> For any non-trivial application, const (and it's stronger brother
> invariant) is a must to allow me and the people I work with to both
> specify the behavior of routines in their signature, and to actually
> provide enforcement.
The combination of const, invariant, final, and scope will allow one to
be much more expressive on the intended usage of a variable than C++
does, along with enforcement of it.
One downside is there's no dipping one's toe into const-correctness.
It's got to be done whole hog.
More information about the Digitalmars-d-announce
mailing list