19

I've got an application that I'm writing in C++, and a question about a library that provides both a C and C++ API (libassimp in this case) in a somewhat haphazard (yet charmingly quirky...) fashion.

It's possible that the answer to my question might require that I use the C API instead of the C++ API (or vice versa, or a mix), if something is available in one but not the other.

The question will get a tag, but should I also give it a tag (because of the library and / or my willingness to use the C API) or should I just stick with the language I'm actually writing in?

7
  • 41
    Tagging your question c and c++ earns you insta downvotes, not matter how charming you are ...
    – rene
    Apr 12, 2021 at 16:42
  • 2
    Note that if you're writing C++ but using a C API, the correct tag is C++, not C. It's not about the language the API was written for. Most programming languages can consume C APIs, but questions about them should not be tagged C unless you're using C.
    – Erik A
    Apr 12, 2021 at 16:48
  • 21
    Simple litmus test: Will a person's knowledge of [language] help them answer your question? Apr 12, 2021 at 18:46
  • This is somewhat similar to a question I asked a bit ago, but yours is better targeted and has garnered better reception. I'll add it here in case people are interested: Do Tags Indicate Intent or Fact?
    – code11
    Apr 13, 2021 at 15:33
  • 2
    Note that C tag info instructs to use both when using C++ code with C libs. But even then it's not advisable to use both, unless the fact that library is written in C is relevant to the question. Perhaps the tag info should be clarified in this regard?
    – user694733
    Apr 14, 2021 at 11:17
  • @ErikA According to John's litmus test, knowledge of C will help someone tell you how to use a C API. So will knowledge of C++. Or Objective-C.
    – user253751
    Apr 15, 2021 at 14:20
  • lib-ass-imp? :D
    – Ian Kemp
    Apr 15, 2021 at 15:51

2 Answers 2

51

Only tag languages, or technologies that are related to the question you are asking, not the application as a whole. Tagging multiple languages, and technologies doesn't help those you are asking for help from help you better; in fact it is likely to actually have the opposite effect.

For example, if you do tag and this instantly confuses users you are asking for help from: Are you looking for a solution in C or C++? This also will easily attract downvotes, as the users that follow are going to read your question, but then (after reading it) determine that they can't help you as they aren't proficient in ; you've (with respect) wasted their time and that isn't helpful.

Here, the language you are writing in is C++ and the language you need a solution in is C++ so tag but don't tag ; it isn't related to the question you are asking. It doesn't matter if the API you are calling is in C, if you aren't asking about that language it isn't pertinent to the tags.

This doesn't just extend to languages though, but also technologies (as I mentioned at the start). Let's, for example, say you're writing a web application in C#, with a SQL Server Back end, and it's hosted using Apache. You post a problem as you're getting a syntax error in your C# code in a function that doesn't even reference the RDBMS back end (I don't write C#, so sorry for a lack of example).. Don't ask a question and tag , , , and . The only tag relevant here is . Yes, your application is hosted on Apache. Yes, your application is using SQL Server as a back end for it's data, but no they are not related to the question you are asking. In this (fictitious) scenario, just the C# code would be enough to replicate the problem, so that's all you should be tagging, and probably the .Net or .Net Core version you are using.

Just because you can add up to 5 tags, doesn't mean you should. Often a language tag, and a version tag are all you need.

13
  • 7
    Spot on advice. Another example: The countless JavaScript questions tagged as [javascript] + [html] + [css], even when the question has nothing at all to do with styling behavior/ CSS.
    – zcoop98
    Apr 12, 2021 at 17:31
  • 12
    "you've (with respect) wasted their time and that isn't helpful" and that's why tags are so important. You shouldn't waste the answerer time, just because.
    – Braiam
    Apr 12, 2021 at 17:34
  • 4
    Honestly, mistagging is one of my biggest pet peeves here, @Braiam . I admit that my skill set is very narrow, but it's so frustrating to start reading through a well written question to find that the tags I am (if I do say so myself) very proficient at aren't actually related to problem at all.
    – Thom A
    Apr 12, 2021 at 17:38
  • 2
    @Larnu on other hand hammering C++ question with my C# gold tag is soo satisfying :) and gives chance for faster moderation of "I got this homework assignment" questions frequently tagged with "Java JavaScript C#" to make it visible to huge portion of all users... Apr 12, 2021 at 19:36
  • 2
    I see this so often with questions on Ruby on Rails, which are tagged with both ruby-on-rails and ruby, even though the question is completely orthogonal to the Ruby programming language and only asking about the API of Ruby on Rails. Apr 13, 2021 at 4:39
  • 11
    @Jörg W Mittag: But why? Rails apps are written in Ruby, not some Rails-specific DSL, and thus often contain Ruby code. It would make sense for those questions to be tagged [ruby].
    – BoltClock
    Apr 13, 2021 at 7:14
  • 1
    @BoltClock It is one of those no-consensus things in my experience. When would you tag what? You seem to be of the opinion that you tag what is present in the question, so if it contains ruby code you should tag ruby. Other people, myself included, will be of the opinion that you should tag according to your target audience. People who know ruby but do not know ruby on rails should not be bothered with ruby on rails questions. I had to setup a very specific and ever growing list of tag exclusions just to get a semi-reasonable front page because people tag very liberally.
    – Gimby
    Apr 13, 2021 at 14:41
  • 2
    I admit I know nothing of Ruby, nor Ruby on Rails, @Gimby, so I could be way off base here but the above feels like a scenario where you 're saying something like "Don't tag [python] when your question is about the [discord.py] library." or perhaps "Don't tag [sql] when your question is about [tsql] only functionality". Even though the answers will be in Python and (a dialect of) SQL respectively. If you, personally, don't know that library/dialect, then the filters for your searches are exactly what you want. It's why I ignore EF questions, for example.
    – Thom A
    Apr 13, 2021 at 14:46
  • @Gimby: Oh, yeah, I can relate to that. I frequently see people subscribed to language tags poking their noses into questions about technologies or libraries they're unfamiliar with, and making ignorant comments or downvoting/closing questions that are clear and on-topic to anyone familiar with the tech. That's frustrating. Though I'm not saying that anyone couldn't answer questions about technologies they're not familiar with, but they ought to be prepared to do the necessary research in order to have an informed assessment of the question, and perhaps provide an informed answer.
    – BoltClock
    Apr 13, 2021 at 15:15
  • 5
    @Gimby: Ironic that people constantly harp on askers doing research before asking questions, yet nobody talks about the importance of doing research before reviewing or answering those questions, and staying in one's lane in general.
    – BoltClock
    Apr 13, 2021 at 15:19
  • 2
    If your question is about something specific that isn't the python language, of course tagging it python would make no sense at all. That's why none of my django questions have the python tag, because they are specific to the Django MVC. You can recognize that I'm using classes and functions, but in some cases those classes represent objects in my model or views. Someone knowing python has no idea what my classes represent, or why I'm structuring my code in such way. That's why tags don't imply other tags, there is no relationship other than association.
    – Braiam
    Apr 13, 2021 at 17:22
  • @BoltClock "but they ought to be prepared to do the necessary research in order to have an informed assessment of the question" I prefer not giving them the opportunity to give uninformed assessments on the questions :)
    – Braiam
    Apr 13, 2021 at 17:24
  • @Gimby C++ questions often contain C code, but that's not used as a justification for tagging them [c]
    – user253751
    Apr 15, 2021 at 14:19
3

The short answer:

Use tags related to what the question is about. Not what it contains.

You must log in to answer this question.

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