[Issue 4410] AA has inconsistent and unreasonable requirements for iterating over reference-type index
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 15 09:56:31 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4410
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #4 from hsteoh at quickfur.ath.cx 2013-08-15 09:56:29 PDT ---
AA keys only need to be immutable in the parts that are relevant to the hash
function. For example, if a class object's toHash method simply casts 'this' to
an integer value, then it doesn't matter what you change in the class, the AA
will still work. Similarly, if a class object's toHash method computes a hash
only on members x, y, z, then it's OK to change member variable w without
breaking the AA.
The only time you actually require immutability in AA keys is when you use the
default hash function that computes a hash over the binary representation of
the entire key.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list