82

I guess (correct me if I'm wrong), is made a synonym of because both of them can be used to refer to the language-agnostic abstract data type. However, in the real world, most questions with these tags are language-specific.

Personally, it feels weird to see a C++/Java question tagged with . The feeling gets stronger considering there are many related tags, e.g, , , , , ...

If it were a good idea, why stop here? There are also , , , , ... Yes, these tags are more language-specific, but like I said, and also have specific meanings in certain languages.

12
  • 29
    even worse, the people that don't know map is a language construct and try to use it when referencing something geomapping related.
    – Claies
    Commented Jun 9, 2015 at 18:21
  • 8
    Other way 'round, actually -- map is a synonym of dictionary. Order matters. It means that if you try to put in map, you really get dictionary; if you put in dictionary, you don't get map
    – Nic
    Commented Jun 9, 2015 at 20:35
  • 14
    To me, "map" is a verb and "dictionary" is a noun, so this seems like a strange synonymization.
    – Jon Ericson Staff
    Commented Jun 9, 2015 at 21:05
  • 2
    Related on [main]: What is the difference between a Map and a Dictionary? Commented Jun 9, 2015 at 21:38
  • @QPaysTaxes Ah, right, of course, updated now.
    – Yu Hao
    Commented Jun 10, 2015 at 1:33
  • Does anyone have the link to the old tag wiki for map?
    – Bergi
    Commented Jun 10, 2015 at 15:59
  • 31
    Even worse, map is a function not a data structure, e.g. in many haskell questions such as this
    – Bergi
    Commented Jun 10, 2015 at 16:00
  • I guess that Maximum A Posteriori (MAP) techniques are off-topic in SO? Commented Jun 10, 2015 at 16:13
  • 6
    Not sure about other languages, but in Python, queries around map function tagged with the dictionary data structure instead will surely confuse a lot of people. Commented Jun 11, 2015 at 3:36
  • 4
    @Bergi, and Scheme, Common Lisp, Emacs Lisp, Standard ML, OCaml, Idris, Agda, Coq, Scalaz, Python, Perl, Ruby, and probably more.
    – dfeuer
    Commented Jun 11, 2015 at 5:07
  • 2
    @JonEricson 'map' is both a noun and a verb. At least in my experience, the noun form is more common.
    – reirab
    Commented Jun 12, 2015 at 13:47
  • 1
    @kolossus Downvoter and nonprogrammer here. The comments and answers are pretty convincing that these are not synonyms. However, I am not sympathetic to the OP, who seems to want to misuse map in the sense of a dictionary (as can be done now) and have it display as map instead of dictionary. That UI extension would do more harm than good; and, besides, programmers should know what "dictionary" means in the context of computer science.
    – Frank
    Commented Jun 12, 2015 at 16:27

4 Answers 4

66

I think synonymizing and is definitely a bad idea. In particular, map actually means something completely different in functional programming. See Lisp. Or even Python, for that matter, which has both map and dict.

7
  • 6
    not to mention map as a function. Commented Jun 10, 2015 at 23:15
  • 12
    @DanielA.White: "map means something different in function programming" means "map as a function".
    – slebetman
    Commented Jun 12, 2015 at 2:53
  • Even in Python, even in Python... Commented Jun 12, 2015 at 14:21
  • 1
    If you want to break the synonym, you should also propose a good way to keep the concepts "mapping function", "map datastructure" and "geographic maps" properly disambiguated. Commented Jun 19, 2015 at 16:39
  • @Deduplicator this is already addressed in tepples' answer, which I think is the way to go.
    – Will Ness
    Commented Jun 19, 2015 at 19:20
  • 1
    @Will Well, this answer leaves it hanging. And anyway, tepples would also need some synonym containing map mapped to dictionary, perhaps [map-datastructure]. And the only kind of DO_NOT_USE disambiguator which might perhaps work is a blacklisted tag. Commented Jun 19, 2015 at 19:32
  • @Deduplicator so maybe it should get blacklisted. "map" is no good a tag precisely because it's two concepts: one is dictionary, the other is function. Whether we need just [dictionary] or [map-datastructure] as well, is yet another separate question. In Haskell e.g. there is a Map data-structure, and there is a hash table too. Both conceptually a dictionary... But perhaps, for Map the [dictionary] tag alone is enough, and for hashtable two tags, [dictionary] and [hashtable] would be appropriate, so maybe there's no need for another tag like [map-data-structure] there, after all.
    – Will Ness
    Commented Jun 19, 2015 at 19:39
4

The real problem is that conjoins two different matters, and while for one of them (data-structures related) the synonymization is perfectly fine, for the other (function-related) it makes no sense whatsoever. This is all language-agnostic still.

The true solution is for to be split into and (that I've created today, incidentally), and only then for to be merged into .

Simply merging into (with the synonymization hack to boot) is insane (/strong language). It also breaks the tag edit interface, as can be seen in my recent question.

4
  • 1
    Well, two major uses (which are the ones which really count, the function and the datastructure), but also a minor use (spatial maps). The problem is probably that they are all one-and-the-same, seen from the right angle. Anyway, if that (or something like it) is ever done, we need a blacklisting of plain [map] for sure. Commented Jun 19, 2015 at 19:39
  • @Deduplicator what is spatial map? do you mean a representation of actual geographic maps?
    – Will Ness
    Commented Jun 19, 2015 at 19:43
  • @Deduplicator if you need it, you can always create the [spatial-map] tag... :)
    – Will Ness
    Commented Jun 19, 2015 at 19:46
  • Yes, a map of some location (which need not be flat), but also of any arbitrary object, for whatever properties may be desired. If I ever need it, I might. Commented Jun 19, 2015 at 19:46
3

Based on the (mis)use I see, I'd prefer to desynonymize and turn it into a DO NOT USE disambiguator, with an excerpt directing the asker to instead use one of these:

  • for things like Java java.util.Map or C++ std::map
  • The recently created for map in functional programming, such as PHP array_map or C++ std::transform
  • for geography
  • for whatever that is
5
  • 1
    mapreduce? then what about people who want to do mapfilter? or mapmap or mapreducemapfilter?
    – slebetman
    Commented Jun 12, 2015 at 2:55
  • 2
    mapreduce doesn't make sense for the function map. (It's also confusing with the Google technology!) Perhaps map-function or something would make sense. Commented Jun 12, 2015 at 3:30
  • or map-higher_order_function to be completely pedantic and clear, like the folks over at en.wikipedia.org/wiki/Map_(higher-order_function) Commented Jun 12, 2015 at 14:21
  • 2
    @TikhonJelvis coincidentally, I've created map-function today, after meta.stackoverflow.com/q/297328/849891.
    – Will Ness
    Commented Jun 19, 2015 at 16:04
  • “DO NOT USE” disambiguators simply do not work. People do not read them. Tag names should be explicit enough, and not ambiguous. At least when someone types “map” it gets replaced by “dictionary”, there is a chance that they remove it and choose another tag if more appropriate.
    – Didier L
    Commented May 29 at 21:45
0

A lot of tags have a specific meaning in some language or another, but more often refer to a generic concept and that's what the tag wiki covers. The map and dictionary constructs are pretty similar when language-agnostic. Many tags should be fairly broad, so we can combine them with other tags to isolate a particular concept.

When you mean the language's implementation of the concept, tagging with or ( and ) seems more appropriate than co-opting a tag that would otherwise be very broad.

We don't use to refer C++'s specific map implementation, even though it has some oddities you might care about. There aren't any real differences between a conceptual and that I know of.

The specific tags like include useful information about the algorithm being used, especially when the question has anything to do with performance or collisions. Same with , and can behave somewhat differently in Bash and PHP.

So I don't think this is the best synonym, but I do think it's perfectly valid.

5
  • 4
    We don't use map to refer C++'s specific map implementation May I ask why not? Since you are talking about C++, note that std::map isn't the one with the same data structure as Pyton's dict, std::unordered_map is. If a question is tagged with c++ and dictionary, which one is OP talking about then?
    – Yu Hao
    Commented Jun 10, 2015 at 1:49
  • 7
    If we used map for C++'s map, what would we use for Java's map? They have very different interfaces. If we used dictionary for Python's dict, what would we use for .Net's dictionary? If the OP cares about a particular implementation, it should show up in their code or they should tag it (hashmap).
    – ssube
    Commented Jun 10, 2015 at 15:26
  • 6
    c++ map, java map, python dicitionary, c# dicitionary is clear enough for me. The language tag provides the context for these tags so that they are not confusing. The fact that C++'s std::map and Java's Map have different interface isn't a big problem in my opinion. Even arrays have different interfaces in different languages.
    – Yu Hao
    Commented Jun 10, 2015 at 16:15
  • 1
    @YuHao that's my whole point: map should refer to the concept and be combined with a language to specify a particular interface. If you care about the implementation, then hashmap and a language covers that. The map and dictionary concepts are the same, so having them be synonyms makes a fair amount of sense.
    – ssube
    Commented Jun 10, 2015 at 16:16
  • 3
    There aren't any real differences between a conceptual dictionary and map that I know of. Most questioners in my experience are focused on the specifics of the particular languages/problem they have and not on the conceptual similarity in language-agnostic way. A map is the same as a dictionary might be obvious to an experienced programmer, but many newbies could be stumped if they had a question around language specific map which gets converted into dictionary question instead, Commented Jun 11, 2015 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .