[Issue 9771] Remove toHash from Object
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 22 19:28:26 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9771
--- Comment #4 from hsteoh at quickfur.ath.cx 2013-03-22 19:28:25 PDT ---
I wouldn't go as far as using introspection to make a default toHash, but I
think there's value in providing a default toHash for classes that just hashes
the object's address (I think that's what the current toHash does).
But if we're going to be forcing users to manually define opEquals and toHash,
then we should make rt.util.hash available to user code. The only thing worse
than having a wrong default opEquals/toHash is a morass of duplicated user code
implementing poorly-designed hashing algorithms for each user-defined type.
--
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