any news on const/invariant?

James Dennett jdennett at acm.org
Mon Dec 17 00:19:48 PST 2007


Walter Bright wrote:
> Many C++ people have argued
> passionately for logical const, but I have become strongly convinced
> that the notion is fatally flawed.

How about a constant/immutable object that refers to and
uses (but does not contain) a mutable object?  That's rather
a common need, and it would be a shame not to be able to
declare some object as being unchanging simply because it
changes other objects' states, or to have to pass references
to those other objects in to functions instead of holding
them in member variables?

-- James



More information about the Digitalmars-d mailing list