ConFoo Montreal 2026: Call for Papers

Voting

: one plus six?
(Example: nine)

The Note You're Voting On

DimeCadmium
7 years ago
For those who believe this function is misnamed, I would like to direct you to https://en.wikipedia.org/wiki/Hash_function . Also, for those who think it's misnamed and supply a comparison to Python, I would like to direct you to https://docs.python.org/2/library/functions.html#hash which does the same thing as this function. (From Python's data-model docs: "User-defined classes have __cmp__() and __hash__() methods by default; ... x.__hash__() returns a result derived from id(x)." - id(x) returns the memory address of the object.)

The cryptographic hash functions you are familiar with, like MD5 or SHA1, are named hash functions because they have a similar design goal: low chance of collisions.

<< Back to user notes page

To Top