[Issue 9771] Remove toHash from Object

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 22 20:29:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9771



--- Comment #7 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-03-22 20:29:03 PDT ---
Whether it makes sense or not to use the bit representation for hashing depends
on the struct, as according TDPL, bitwise comparison is _not_ supposed to be
the default for structs (though as bug# 3789 indicates, that's currently
buggy). However, it wouldn't be all that hard to come up with a default toHash
which corresponded to the default opEquals by having it simply use the toHash
methods of the member variables to generate an overall hash. So, we could
definitely make it so that toHash is generated for structs as long as opEquals
hasn't been defined.

-- 
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