5

Can you please add a syntax highlighting hint for the C++ programming versioned tags such as .

It is generally recommended to use both and the version-specific tag, and already has this hint. Meta has consensus on this (Should the [c++] tag be mandatory for posts with C++ language version tags?).

However, not everyone follows these rules. There are approximately 10,000 questions which are not tagged and which may benefit from this hint. Here is the data:

Tag Total amount Untagged amount Percentage tagged
683 60 91.22%
808 48 94.06%
55,517 7,724 86.09%
8,479 633 92.53%
10,737 624 94.19%
4,947 99 97.99%
202 0 100.00%
7 0 100.00%

Only a small fraction is missing the tag, but they obviously should receive some highlighting hint as well. Whether these questions should be tagged is a separate debate. Whether this can be done through a mass-editing procedure is also a separate debate (Mass tagging request: add [c++] to questions tagged [c++98], [c++03], etc).

This request is about ensuring that those ~10,000 questions also have syntax highlighting, regardless of the tagging issue.

4
  • 1
    Related: C++ tag variants do not highlight syntax
    – Henry Ecker Mod
    Commented Sep 24, 2023 at 21:03
  • 1
    It appears that c++11 and c++17 already have the language code set to lang-cpp
    – Henry Ecker Mod
    Commented Sep 24, 2023 at 21:04
  • @HenryEcker interestingly, the conclusion in the related Q&A is that you should just add c++. I've also suggested that approach here: meta.stackoverflow.com/q/426588/5740428. Commented Sep 24, 2023 at 21:41
  • The numbers show that there are thousands of questions for which such a hint is useful though. Nearly 8000 C++11 questions have automatic syntax highlighting only thanks to the existing hint. Either we say that this is unreasonable and they should just be tagged c++, and remove hints from all versioned tags, or it should be made consistent. The current half measure seems indecisive. Commented Sep 24, 2023 at 21:43

1 Answer 1

4

There is no reason to change the highlighting since the C++ tag should always be used anyway, as per the tag usage guidelines.

However, not everyone follows these rules.

And yet those are the rules - the C++ tag wiki comes with tag usage guidelines which we establish together through community consensus:

We do not change the tag wiki through unilateral edits that radically changes the meaning of the tag usage, carried out by a single user without prior discussion, as was done here. This was a very inappropriate edit. I have done a rollback, since this part is crucial to anyone tagging/moderating the C++ tag:

Unless the question explicitly mentions which version of the C++ standard is used, it is assumed that the current version is used.

That means for example that any C++ question posted currently is assumed to be C++20 unless explicitly specified otherwise. And the C++20 is then not necessary.

And as it happens, SO applies the same system to most other programming languages as well. The C++ tag should behave as the rest of the major programming language tags.

7
  • The community consensus it that the [c++] tag should always be used in combination with the versioned tags. However, the reality obviously doesn't reflect this. It doesn't solve the issue of missing syntax highlighting to merely restate that those are the rules. There's not going to be any syntax highlighting no matter how strong the consensus of meta users is. I have also suggested mass-tagging of all [c++XY] questions with [c++] here: meta.stackoverflow.com/q/426588/5740428 which would be a solution. Commented Sep 26, 2023 at 10:33
  • Let's ask it like this: do you think that the approximately 10,000 questions which are missing the [c++] tag but which have a versioned tag should not have syntax highlighting? I have not seen you argue in favor of this, or against it. I have only seen you argue that they should have the [c++] tag, and we agree on that, but agreeing on that doesn't fix anything. Commented Sep 26, 2023 at 10:36
  • 1
    @JanSchultke The current version is ISO/IEC 14882:2020. iso.org/standard/79358.html. We don't get to decide this - it is ISO who decides which version that is marked as active. This too should be made obvious by the rules from the tag wiki which were incorrectly and carelessly removed: "That is, whichever version of ISO 14882 ISO currently lists as active." It is perfectly clear and unambiguous. How technical standards work is well-established engineering practice since many decades back.
    – Lundin
    Commented Sep 26, 2023 at 10:43
  • 1
    Standard meaning "everyone does the same thing". How standards work, which ones are listed as active, withdrawn, draft etc is also well-established.
    – Lundin
    Commented Sep 26, 2023 at 10:46
  • Yeah fair point, that is unambiguous and they list the current lifecycle on their website. It would be helpful to provide a link to that. To be honest this discussion is a bit off-topic for the question though. This Q&A is about syntax highlighting, not about maintenance of the [c++] tag wiki. Commented Sep 26, 2023 at 10:46
  • @JanSchultke It is related, since I think providing syntax highlighting beyond what c++ already does would send out the wrong signals about how these tags should be used.
    – Lundin
    Commented Sep 26, 2023 at 13:21
  • I agree that there is a form of encouragement, but the standards which are most affected are C++14 and C++20. C++11 and C++17 already have highlighting. The C++20 questions can reasonably be retagged by the community because there are fewer than 100, or we can just leave them as is. I don't think too many people are still using C++14 and actively posting on SO about it, so sending a message to those legacy revision users is likely not a major problem. It would mostly benefit the hundreds of existing C++14 questions which are untagged at this time. Commented Sep 26, 2023 at 13:24

You must log in to answer this question.

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