AAs

Rainer Deyke rainerd at eldwood.com
Thu Apr 9 16:44:06 PDT 2009


bearophile wrote:
> You are right, there's a problem here, even once you have added an
> ".idup" to AAs. A hash value isn't data, it's metadata, so you may
> have a lazily computed mutable metadata of immutable data. Once
> computed the hash value essentially becomes an immutable.

This sounds like the difference between "logical const" and "physical
const".  I use the "logical const" features of C++ (along with the
'mutable' keyword) in C++ all the time for just this purpose.  For
better or worse, D has gone the "physical const" route.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list