On Fri, 10 Apr 2009 03:44:06 +0400, Rainer Deyke <rain...@eldwood.com> wrote:

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.



One can still write a Mutable!(T) template and get logical const :)

Reply via email to