Tags describe the knowledge needed to answer
Categorization
Properly tagged c++
questions are ones that are about C++. For languages this is pretty straightforward; if the question is "how do I do X in Y language" then it is a Y language question, and if the question is "why do I get X error from my Y language code" then it is a Y language question. (However, it is not a Y language question if the question is "In language X, how do I emulate Y language's Z feature?".)
For language-specific language feature tags (like python-asyncio
), or major-library tags (like vue.js
) it's generally still pretty straightforward: questions can easily be about using the feature or library.
For more common concepts, it's less clear, but it can still be useful sometimes. While Java questions will almost always involve a class in some way, relatively few of them are fundamentally about how classes work. That would cover things like confusion between class and instance members, or the rules for how many/what kinds/names of classes can go in the same source file, etc. In an ideal world, if I searched [c++] [class]
I'd like to see primarily canonicals about how classes work specifically in C++ (I really don't think there's value in making a separate c++-class
tag for that sort of thing). So stuff about what the protected
keyword means, how the rule of 3 (5 now?) works, and so on and so forth. You get the idea.
In practice, I see 1.9 million questions tagged [java]
, and only about 12 thousand tagged [java] [class]
, out of a total 79 thousand [class]
questions. So I don't get the sense that there's a huge overuse problem - although the tag would probably be better removed from a lot of those 12 thousand questions, based on a glance at a few recent ones.
From the Python tag, a good example of why those kinds of tags might be useful: the question How can I get the source code of a Python function? is tagged [python] [function]
. Sure, that's redundant with the title, but it does help with categorization; and the question really is fundamentally about functions - it's not just a matter of expecting to write one or more to solve the problem. Or consider How can I use `return` to get back multiple values from a loop? Can I put them in a list? , which doesn't mention "function" in the title, and covers fundamental, important technique for novices. The question isn't really about the mechanics of building a list; it's about designing a function, and understanding the capabilities of functions as defined in Python. (Well, okay; it is also about understanding control flow. But that is still within the context of the function. If the goal were to use the multiple values computed within the loop, later on in the same function, the question would simply not be interesting in the same way.)
Search benefits
In my view, tags like this help make it easier to find canonicals. There are some really specific ones out there, which make it easy to find things that would be really hard to find otherwise. For example, there are only a few dozen questions tagged [demorgans-law]
, which is exactly why the tag has value: that makes it easy to refer beginners who make a common logical error, to a duplicate that explains the logic. Their issue generally should not be considered a typo, because their fallacious thought process is common, readily characterized, and sympathetic.
Please try for a moment to imagine, how hard it would be to find Why does non-equality check of one variable against many values always return true?, if you did not already know the title; there are any number of ways you could phrase the misconception that is addressed, and the words you need for describing the problem are all quite generic and have massive overlap with other things. And you would never expect something like that to say "De Morgan's Law" in the title, because of how unnatural that is. But as an expert, you just need to know the name of the concept, and then you can search by tag. That name is like a magic key for the monolithic Stack Overflow dictionary, that answerers know but askers don't - not by the design of Stack Overflow, but by the nature of the problem.
Implications
Whenever you edit a question to improve it, please also consider the tag list carefully - for both additions and removals. The community around each language tag may also develop its own standards: for example, I think there is a reasonable consensus among Python curators that new questions do not benefit from a [python-3.x]
tag; that [python]
should be added to new questions tagged [python-3.x]
; that minor version tags should only be used when known to be relevant to the question (because an expert has answered in a way that proves it, or because the question is a canonical about a feature that was introduced in that version); etc.
question
tag 😄class
is a Marxist plot. They must be silenced.