0

There are a lot of questions tagged as questions. Although some of them are relevant for C only (e.g. void* ptr = malloc(...);) , a lot of them are relevant to C++ as well, at least to its procedural subset.

Is it reasonable to add tag to such questions where the code is valid C++ code and why? Some advantages off the top of my head: less duplicating questions half of which are tagged , half of which are tagged .

Note: I don't pretend to say this necessarily is a good idea - I just want to know what others think about it. I have seen posts with exactly the opposite opinion. The question itself is still relevant - I know other people who aren't sure about it as well, and I've seen such edits on SO myself in the past.

16
  • And hey, I don't think it's right to downvote me a lot here. This is intended to be a discussion, see my note Aug 22 '13 at 10:49
  • 1
    @sasha.sochka I didn't downvote, but note that those who did might have as well answered "no". Downvotes on Meta are for disagreement.
    – H2CO3
    Aug 22 '13 at 10:50
  • 3
    @H2CO3, as for my understanding in this case it's better to upvote/downvote your or other answers, not the question. Aug 22 '13 at 10:53
  • 2
    And the question itself is still relevant - I know other people who aren't sure as well, on SO such edits happen often too. Aug 22 '13 at 10:55
  • @sasha.sochka great, point me to those edits please so I can roll them back!
    – H2CO3
    Aug 22 '13 at 10:56
  • @H2CO3, I'll roll them back myself if I see. My old question: stackoverflow.com/q/17634243/2149111 tagged with C and C++ both, was it correct in your opinion or should be retagged? Aug 22 '13 at 10:58
  • @sasha.sochka If one tags with C and C++ because he's interested in answers regarding both languages, then it's fine. Since you have got answers which concern not only C but C++ as well, and they clearly state that there's a difference, I think the two tags don't contradict each other for your specific question, so it's OK.
    – H2CO3
    Aug 22 '13 at 11:01
  • 1
    The problem with tagging that both C and C++ is evident from the answer. It is effectively answering two different questions, having to quote from two different standards and explain how those two languages have different syntactical rules at play. That's the best explanation I could give for why it should have been asked as two separate questions. The alternative would have been: "Here's why it's legal in C, blah blah blah, oh and it's legal in C++ because it was legal in C." Also not very useful.
    – Cody Gray
    Aug 22 '13 at 11:02
  • 1
  • 4
    @H2CO3 Downvotes are no longer for disagreement on Meta: meta.stackexchange.com/q/193884/213634 - with feature requests being an exception.
    – user213634
    Aug 22 '13 at 11:50
  • 1
    @ Anders UP: Nice post. It got my +1. If they put it to the action, it may save the currently "Dysfunctional" SO's meta voting system. I peronally know a couple of people who stopped using SO, because of this flaw.
    – S Nash
    Aug 22 '13 at 11:58
  • 1
    @psubsee2003 There is no implicit feature request in this question, the OP is asking whether it is reasonable to add the extra tag. And as for community moderation, the suggestion garned a net +50 votes in two days. And check the FAQ meta.stackoverflow.com/help/whats-meta - On posts tagged feature-request, voting indicates agreement or disagreement... This post is not a feature request.
    – user213634
    Aug 22 '13 at 12:04
  • 1
    I think inferring that the OP is requesting a feature that adds a C++ tag automatically to every C question is going way too far; there's no feature request here.
    – Wooble
    Aug 22 '13 at 12:09
  • 3
    A better proposal would be for everyone to stop saying "vote this way", or "here are the rules for voting", or "oh, votes are different here because blah blah blah". Just vote based on your personal opinion and leave it at that. There's a reason we don't force a comment to accompany every vote. It gets too noisy. That's happening everywhere now. Just stop whining about votes.
    – Cody Gray
    Aug 22 '13 at 12:10
  • 1
    @AndersUP I see, thanks!
    – H2CO3
    Aug 22 '13 at 12:49
23

No, it's not reasonable at all - C and C++ are very different languages, and there more often are differences than not.

And after all, we don't need even more confusion (and "C/C++" questions).

5
  • 4
    +1 Lots of people (myself among them for a long time) think they are coding C++ while they are actually coding C. They just don't know ... and should be educated.
    – d-stroyer
    Aug 22 '13 at 11:06
  • @d-stroyer Thanks! To be honest, I'm not a great C++ programmer. I know some C++, but I don't have the knowledge of the top C++ users here by any means. That's why I usually stick to answering C questions only, but frankly, I often exploit "C/C++" questions to boost my rep by answering the question from a C point of view (and then I point out, of course, that "this applies to C only").
    – H2CO3
    Aug 22 '13 at 11:08
  • 1
    @d-stroyer: If they use a C++ compiler, they are coding C++, not C. Their style may be reminiscent of C, but the code is C++. (Pretty much the whole point of this question... the language rules are very different even if they achieve compatibility on a lot of code)
    – Ben Voigt
    Aug 29 '14 at 4:58
  • @BenVoigt Yeah, I realize that the rules are very different, hence my answer above. However, in my experience, people unfortunately think about "C/C++" as "a language", and even if they are coding in C, they still add the C++ tag, just in order to boost the visibility of their question or whatever. If in doubt, having seen some C code (with no reference to C++ whatsoever), I always tried to answer in C, pointing out that it was C, and consequently shall not be treated as C++. When the solution was simple enough, I attempted to add a C++ implementation too, pointing out the differences.
    – H2CO3
    Aug 29 '14 at 5:06
  • Depends on the question. Some questions arise in both, and can (and often are) posed in a way which does not touch on any differences at all. Sep 13 '14 at 19:18

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