[Issue 9771] Remove toHash from Object
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 23 08:20:16 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9771
--- Comment #9 from hsteoh at quickfur.ath.cx 2013-03-23 08:20:16 PDT ---
(In reply to comment #8)
> I think that will conflict with having a moving garbage collector.
Good point, maybe the correct approach is to hash the respective hashes of each
member of the class?
@Jonathan: I agree, the default toHash should not be generated if the
class/struct defines opEquals. It's the user's responsibility to keep the two
consistent. So basically, the default toHash should correspond to whatever ==
corresponds with by default. If == is bitwise comparison, then toHash also
should be bitwise hash, etc..
--
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