12

I see a lot of question about frameworks, which aren't tagged with the used programming language. Frequent examples are questions about WPF. Sometimes the questions are not related to the used language and I understand, that they are not tagged with it. But if a question has some related code, there is often no tag for the programming language.

Should a question about a framework always be tagged with the used programming language if the language is related to the question? Should this also be done if it's clear which language is used?

Advantages: More people will find the question if they set their filter to a programming language and can answer questions about the framework as well.

Disadvantages: A lot of people which want to find questions on a programming language will find the framework-related questions as well, but they might not want to find them.

4
  • 1
    A WPF question that is just around a XAML issue doesn't necessarily need the C# tag, so no, it shouldn't always be tagged with one.
    – Joe
    Commented Apr 2, 2015 at 14:11
  • @Joe I mentioned this in my question. For clarity I will update my answer
    – Claudio P
    Commented Apr 2, 2015 at 14:12
  • 1
    Should, for example, jquery questions then also be tagged with javascript? What happens if the user manually added 5 tags already? And what if the user entered 4 tags, but 2 of them could have language tags added?
    – Cerbrus
    Commented Apr 2, 2015 at 14:13
  • If there is space for a language-tag, it is obvious which one should be used, and there is no good reason to leave it out, just add it. Which means nearly all questions will get a language-tag, and the automatic syntax-highlighting depending on it. (Manual hinting is comparably clumsier.) Commented Apr 2, 2015 at 14:28

2 Answers 2

9

Personally, I would always tag it with the appropriate language tag. Even in your example with WPF, I frequently have to include C# snippets to explain my answer, which obviously aren't useful if you actually needed VB. More is more in this case.

Also, as you noted more people follow C# than WPF, so you'll get more eyes on your question. If somebody just hates WPF questions, they can always ignore the tag.

2
  • 1
    I would also imagine that some of those tags don't have syntax highlighting, but the language tags take care of that.
    – Laurel
    Commented May 25, 2016 at 16:13
  • > If somebody just hates WPF questions, they can always ignore the tag. This scenario happens often with Dart and Flutter, but the situation is not so simple. Even if I exclude questions with the flutter tag, many people leave it out, instead adding only a topic specific tag like flutter-layout. As a result, it's practically impossible to filter for Dart-only questions.
    – hacker1024
    Commented Nov 2, 2021 at 10:33
3

One good reason to add the a language tag is to force the implied syntax highlighting to trigger which directly improves readability.


Consider this piece from What is syntax highlighting and how does it work?:

Tags:

You can specify any tag that exists on the site, and it will use whatever language code is currently specified for that tag. Keep in mind that by default all tags start off with none as their language code. Tags with none specified as their language code will be ignored and revert to default.

You can also use the plain none keyword to manually specify no syntax highlighting, similar to using the lang-none code above.

If you don't tag with something that is in the list of supported languages, nothing gets highlighted.

For example, if you tag a question with only "angular", no syntax highlighting is applied even though the post would benefit from JavaScript/TypeScript highlighting.

I guess alternatively you could go through and manually add the <!-- language: lang-or-tag-here --> annotation or maybe ask to have the framework's tag associated to a specific syntax highlighting rule, but I think the question still benefits from the language tag.

1

You must log in to answer this question.

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