27

Personally, I never find any use for these tags because they apply to tens of thousands of questions in a variety of languages. Even if I filter per-language in a search, such as looking for "[c++] [class]" I get countless results (In this case, 15,816).

Such broad tags are possibly useless, at least in combination with languages where these features are essential

I would argue that these tags are virtually useless because they don't narrow down the topic enough. Virtually every C++ question involves some , and most questions involve some too. Only questions about language fundamentals can avoid them, and those are typically questions. Or alternatively, questions about language can avoid them.

You would be hard-pressed to write a question that does not involve , so the tag is meaningless in this context.

In any case, I feel like these tags are of very little use because they apply to almost every language-specific question out there, and if they don't, there is usually another relevant tag that would describe this case better.

To be fair, these tags can be useful in combination with certain languages. Especially when classes were a young feature in , the tag could be quite narrow. It is situationally useful, but only in combinations with some tags.

If they aren't useless, do we have any numbers to back it up?

Maybe I am wrong, and a substantial amount of people finds these broad tags useful. If so, do we have any evidence? Do we know how many people are watching for example, or is this data not available through any analytics?

If they are useless, should we burninate them?

If people genuinely don't make use of these broad tags, should they perhaps be burninated? They feel like "compulsory tags" that you just slap onto a question if you can't think of any more relevant tags. After all, your question probably contains or uses a , so may as well dump that in there, right? They almost aren't tags, but placeholders for tags.

I feel like that practice is doing more harm than good in the end. Burninating them seems extreme given that they are situationally useful when combined with some languages, however, maybe the use with or should be restricted.

2
  • We should add a question tag 😄
    – m.reiter
    Commented Sep 25, 2023 at 6:52
  • 5
    Clearly, making tags about class is a Marxist plot. They must be silenced. Commented Sep 25, 2023 at 18:16

1 Answer 1

15

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.

7
  • 3
    "(I really don't think there's value in making a separate c++-class tag for that sort of thing" Could you go a bit into detail there? Because that seems to fit the same mold as the "python-asyncio" tag to me, aside from the name being used in more languages - which to me suggests disambiguation is more important. Commented Sep 24, 2023 at 16:45
  • 2
    @MisterMiyagi to be totally honest, I haven't thought about it that much, and I think you'd be perfectly justified in making that proposal separately. Commented Sep 24, 2023 at 19:41
  • 4
    Making composite tags that are language + concept (c++-class, python-function, etc.) is a bad idea. We've had a similar discussion with the -vba tags, and invested a very substantial amount of work in removing them see this, and the half-a-dozen linked posts. We don't need a repeat.
    – Erik A
    Commented Sep 25, 2023 at 8:00
  • 3
    @ErikA Ah, yes, there's that, too. Thinking about it more clearly, python-asyncio isn't just about how to do asynchronous I/O in Python; it's about a specific named standard library module used for that functionality. It's expressly not, for example, for questions about using select or combining it with threading. Commented Sep 25, 2023 at 8:21
  • 1
    @ErikA I am afraid that discussion is impossible to follow in a reasonable timeframe. As far as I can tell, this was more of an either-or question that was arbitrarily decided to get rid of the ambiguity, not necessarily because one situation was clearly favourable. This may not be applicable to cases in which the "second part" isn't a concrete thing by itself – class by itself is a very broad concept but "c++ class" isn't the concept and very concrete. Commented Sep 25, 2023 at 8:57
  • 1
    @KarlKnechtel In the same direction of thought, wouldn't a hypothetical python-class similarly be about a specific named language feature? That things are builtin or not doesn't seem to change that they are fundamentally things that only make sense as the specific thing in a specific context. (This isn't meant to argue a point here, necessarily, just to underline why it seems useful to provide an argument how these cases might differ. Perhaps "python-class" and "python class" would indeed be separate things, just as one can discuss threading in Python more generally than the module.) Commented Sep 25, 2023 at 9:03
  • 3
    @MisterMiyagi The general convention is not to create language-specific tags for every combination of feature+language. Yes, async/await works differently in Python and in C#, and arrays work differently in JavaScript and C++, but that doesn't mean that they are not the same overarching concept. It just clutters the tag names (because you'd still need to tag [javascript]+[javascript-array]), and makes language-agnostic questions harder to find.
    – Bergi
    Commented Sep 25, 2023 at 18:46

You must log in to answer this question.

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