41

The proposed tag change from e.g. to may be purely cosmetical, but it would improve consistency. Major tags which reference parts of the C++ standard library use the latter format as well (not an exhaustive list):

Some other tags use a - separator. These are typically tags with far fewer posts (this is an exhaustive list):

For the sake of consistency, I propose renaming all tags to use only one naming scheme. I find the std-xx scheme more readable, but seeing that the most used tags use the stdxx scheme, it might make more sense to keep it that way.

Which do you prefer? Here is a StrawPoll!

19
  • 22
    I too find std- more readable - I wonder if it wasn't used because of tag name limits, or if there's some other reason. I assume typing in "stdarray" would bring up stdarray and std-array
    – Tas
    Commented Aug 30, 2020 at 13:49
  • 15
    What bothers me more than the inconsistent dashes is: Why does C++ get to have the std(-) prefix? Why is it stdvector (or std-vector) rather than cpp-vector (or cpp-std-vector or some other variant)? That tag in particular is really bad as far as tags go, as its description is just “A sequence type defined as part of the Standard Library.”, which doesn't even mention C++, just like its long description. C++ isn't the only language to have a standard library, and is not even the only language to name it std.
    – mcarton
    Commented Aug 30, 2020 at 16:17
  • 11
    @mcarton the anticlimactic answer to why is: For historical reasons. C++ had been the only language to use the std:: prefix for decades until Rust came along in 2010. It was simply the first. stdvector is older than the first version of Rust. Personally I find Rust's use of the std:: prefix a bad decision, since in many cases searching for this will bring up C++ results. They could have just used rust:: and it would have been almost as short with no conflicts. Commented Aug 30, 2020 at 16:26
  • 8
    @J.Schultke I know that C++ was first and is way more common, but it doesn't make “A sequence type defined as part of the Standard Library.” a good description, and it doesn't mean that things can't change to be less ambiguous.
    – mcarton
    Commented Aug 30, 2020 at 16:44
  • 2
    @mcarton Maybe a more valid justification than purely “it’s historical” is that this is very widely what people are used to searching for (due to history, of course). People are very used to the fact that searching for “std vector” (rather than “cpp vector”) brings up the correct result — here and elsewhere. I don’t think (but I may be wrong) that Rust users have the same expectation. Commented Aug 30, 2020 at 19:43
  • 3
    As far as consistency goes, the following are still open: Merge tags std and stl and What is the difference between the tags std and c++-standard-library? (with more background here).
    – dxiv
    Commented Aug 30, 2020 at 19:46
  • 2
    c++-std-vector would be much better. Commented Aug 30, 2020 at 23:05
  • 2
    @mcarton It would be possible to tag some questions with [c++][std-vector] and others with [rust][std-vector], where [std-vector] doesn't have to be language-specific. A similar thing happened with the [async-await] tag which for a long time was C#-focused before other languages like JavaScript or Python came along.
    – Bergi
    Commented Aug 31, 2020 at 7:42
  • 2
    @AsteroidsWithWings Why adding c++ if that is already the main language tag anyway. I like [c++][std-vector] and [rust][std-vector] much more. Commented Aug 31, 2020 at 7:44
  • 1
    I'd say the strawpoll here is unnecessary. It's a very flawed system (I can vote as many times as I want), and we already have a ranking system here: votes. You can simply write an answer for either option and let the voting take care of it.
    – Adriaan
    Commented Aug 31, 2020 at 11:55
  • Related: upon reading this, I realized the std is messed up. Made a separate thread here: Fixing the std and stdlib synonym tags.
    – Lundin
    Commented Aug 31, 2020 at 13:47
  • @Trilarion Because tags are not linked to one another Commented Sep 2, 2020 at 20:27
  • @AsteroidsWithWings But where would be the advantage of tagging a question with [c++] and [c++-std-vector]? Commented Sep 2, 2020 at 21:12
  • @Trilarion So that people can find it by subscribing to C++ questions, and so that people can find it by searching for questions about C++'s std::vector<T, Alloc> types. The same advantage of any other tag. Remember: tags are not about having some information on the post itself; they are about discovering and finding posts. Commented Sep 2, 2020 at 22:29
  • @AsteroidsWithWings Maybe we need a "this tag is often used together with these other tags, click on another tag to additionally limit your search" feature. Then we would not need to manually code it in the tag names. Commented Sep 3, 2020 at 7:51

3 Answers 3

8

I propose to add the dash to all tags which currently do not have it, i.e. change to , because it is easier to read.

1
  • I've made the answer community wiki, please feel free to add reasons and arguments in favour of adding the dash.
    – Adriaan
    Commented Aug 31, 2020 at 11:58
-4

I think the std prefix is misleading and confusing. To boldly claim that std is C++ specific doesn't hold well. The C++ language support for std:: was very shaky prior year C++98 standardization, so C++ has not claimed that keyword for that long, only since 1998. Whereas C and UNIX had std prefixes since the early 1970s. And there's likely lots of std-whatever outside the scope of C and C++.

Then we have the C library header tags that are named , , , etc. These are also C++ headers, but these headers are actually named stdio.h etc, unlike the C++ ones.

std::vector etc is not the name of a library, it's the name of a class residing in the std:: namespace. So it's already very confusing in a C++ only context: does the tag refer to the class or the header? Then bring in all the ambiguity with other languages on top of that.

I think is a better alternative.

2
  • If the naming scheme std-vector was used, then it would actually become easy to distinguish these C++ types from stdio and the like. I also don't see the ambiguity of std::vector and <vector> as a problem. You never use one without the other so for tag-purposes, they are interchangeable. c++-vector has the same ambiguity, if not more. Does c++-vector refer to <vector>? Without the std prefix in the tag, one might think so. Commented Sep 2, 2020 at 20:31
  • Personally, I really don't care about the Rust ambiguity. Rusticians are used to finding C++ results when searching for std something anyways, so this won't change anything for them. And C++ devs are used to finding C++ results when searching for std::. If anything, blame Rust for using std:: when rust:: would have been perfectly fine and nearly as short. Commented Sep 2, 2020 at 20:35
-8

I propose to change all tags to not use the dash, i.e change to , because the majority of tags relating to the standard library already use it.

You must log in to answer this question.

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