[Issue 16654] hashOf returns different hashes for the same string value

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 3 06:55:23 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16654

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com

--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
As I determined in that thread, note that core.internal.hash.hashOf does not do
the same thing as object.hashOf. It hashes only the bits of the given type.

I can't think of a single valid reason for hashing the pointer and length of an
array instead of the contents of the array. I don't know the right answer here,
but at the very least hashOf isn't documented or understood properly.

--


More information about the Digitalmars-d-bugs mailing list