3 ms·
I believe this is ultimately a question of lexicography: what do the terms "hash code" and "hash table" mean? The name "hash code" comes (UIAVMM!) from the ide
by twic 9y ago
I believe this is ultimately a question of lexicography: what do the terms "hash code" and "hash table" mean?
The name "hash code" comes (UIAVMM!) from the idea of chopping an input into little bits and mashing them all together, just like you'd do to potatoes or beef to make hash browns or steak haché. I imagine the name "hash table" comes from the fact that is typically probed using a hash code. In fact, i would be interested to know if the first hash tables had separate steps of hashing and input and reducing it to a table index, as modern ones do, or whether the input was hashed directly to an index.
An "identity hash" like this is clearly not made that way.
However, lexicography is not etymology. If you want to know what a word means, you have to look at how people use it. In the Java world, at least, anything that comes out of hashCode() is a hash code, even if it's not made by traditional hashing. And universally, the data structure implementing a map by reducing keys to indices into a table and then dealing with collisions somehow is known as a hash table.