13

The wiki for begins with "A hash map (or hash table) is a data structure", implying that the tag has the same meaning as (e.g., it is not intended for labeling the Java classes). Therefore it seems that these should be made synonyms, but as a non-programmer I am not certain if there is some subtle distinction intended (which should be made explicit in the wiki by someone who know the intent).

Since currently has 4,377 questions and only 2,124, it seems that the former should be the canonical tag name.

It seems that there is also a lack of clarity in , which (based on the most recent 15 questions) seems to be used often to refer to the hash table data structure (e.g., in Perl or Ruby).

and would also seem to be synonyms based on the wiki for beginning "A hash function is any well-defined procedure or mathematical function".

Someone with more than half a clue should probably resolve this issue (whether by editing wiki entries to clarify distinctions or proposing the appropriate synonyms).

3
  • The first pair is actually even more grey-area than that since Java has both a (legacy) HashTable class as well as the newer HashMap class. Apr 26, 2014 at 19:15
  • @BrianRoach I noticed (and noted—"e.g., it is not intended for labeling the Java classes"—one of the recent questions was for the difference between these Java classes) that aspect, which is why I suggested that editing the wiki entries might be an alternative solution. I suspect that the differences are not sufficiently broadly recognized or significant to justify different tags. Using standard class names for tags (even for popular classes in popular languages) is probably not good practice. Perhaps hyphenating the tag would make the distinction clear—I was surprised they were not.
    – user2467198
    Apr 26, 2014 at 19:31
  • 2
    "Hash table" is the most language-neutral, canonical term (which is why Java chose it originally, of course). The greater popularity of the hashmap tag on SO is only because of Java's influence, and that is only because they needed a non-taken name when they reimplemented the class.
    – Boann
    Sep 30, 2014 at 15:04

2 Answers 2

7

The grey area isn't just between and . In Ruby, the built-in dictionary/map class is called Hash, so 99% of the Ruby questions should probably be instead.

Perhaps itself should be removed since it leads to such confusion. That would leave the much clearer and .

2
  • 6
    Adding a hyphen might also reduce the confusion with the class names (i.e., [hash-table] or [hash-map]). These tags are not intended to refer to classes.
    – user2467198
    Sep 30, 2014 at 15:07
  • 1
    Have fun going through about 11000 questions mapped [hash] and applying the better tags. Now, synonymizing hash to hash-function might be useful. Nov 2, 2014 at 1:35
0
  • "Hash table" is the proper, language-agnostic CS term.
  • "Hash map" is the name of the stock implementation of a hash table in Java (and probably some other languages inspired by it). Of 10,5k questions, 7,5k are also tagged (not counting other Java-related tags), and 3,2k with Android-related tags (with 1.6k intersection). So, it's not a mathematical construct but a specific class.

So, the tags should not be merged, and 's wiki should be fixed to clarify that it's not a data structure but rather its stock implementation in Java and some other languages.

You must log in to answer this question.