22

There were two questions with similar looking titles:

return statement vs exit() in main()
What is the difference between exit and return?

Both questions have similar titles, but really one was about expert knowledge of the difference between exit() and return in a very specific case (only in the main function and for C++). The other question was a beginner's one about the difference between exit() and return anywhere in a program, but only for C code.

C++ and C are different languages and there are very specific issues about early exit of functions (the object destructors are not called). There are also issues specific to the main function (VMS returns different value if you exit a process using return from main or exit()).

For months the two questions were marked as duplicates, which was obviously wrong for people understanding C or C++ and for anybody reading the answers. Finally the erroneous duplicate mark was removed yesterday and the two questions went back to their normal state.

Surprise: a few hours ago a moderator, Flexo, took it upon himself to merge both questions! Even worse than the previous duplicate mark that had finally been removed.

Now what should be done? Basically, who watches the watchmen?

As my answer became meaningless after merging, should I delete it? Or change the question to make it broad enough to justify both kind of responses and add content to my answer to explain both C++ and C behaviors?

I also considered raising the issue to the involved moderator, but I have found no way to contact a specific moderator (maybe a comment to @Flexo).

14
  • Merges cannot be undone, outside of lots of manual DB level work by a developer.
    – Servy
    Commented Sep 6, 2016 at 21:01
  • 6
    Question merges can be undone. It does require employee-level access because things can get crazy if there's been a good deal of activity after the merge, but moderators can review and ask for this if/when necessary.
    – Shog9 Mod
    Commented Sep 6, 2016 at 21:03
  • 1
    The merge was very, very likely done in response to a flag. They're pretty rare overall. In any case, this is the right place to get the thing addressed/discussed.
    – jscs
    Commented Sep 6, 2016 at 21:03
  • 1
    @Servy: I more or less expected that. The remaining options for me are deleting my answer or rewrite it to include C++ behavior. And it will still answer to something much broader that the question now asked.
    – kriss
    Commented Sep 6, 2016 at 21:03
  • 2
    And I can confirm that the comment adressed to moderator indeed works to contact him. I can probably fix my answer to add relevant C++ details.
    – kriss
    Commented Sep 6, 2016 at 21:17
  • 3
    I don't get the beef, the question has been tagged [c] and [c++] forever. And you even note the difference in your answer. There is a never-ending holy war in those tags about proper usage of the tags but it is war that is only ever fought by experts. Questioners never care much about using C in a C++ program. We are writing Q+A for people that have questions, not for experts. Commented Sep 6, 2016 at 21:37
  • 1
    @Hans Passant: What do you suggest ? Merging C and C++ tags ? the trouble is that for the answer to be correct for C++ you must add many details and go in depth in the difference between C and C++. The other question (the merged one) was not tagged C++. For that kind of question I could also explain how exit() works in python for instance, there wouldn't be more difference than between C and C++.
    – kriss
    Commented Sep 6, 2016 at 21:55
  • You are treating this merge like somebody should build a wall and you are not going to pay for it. Even though you discussed how to climb it from either end. Sure, would be nice if the [c] and [c++] tag communities could get along with each other a little better, there is lots to learn for each other. Both ways, spare me the C++ programmer that thinks an exception is somebody else's problem, been there done that. A tag merge seems a bit optimistic doesn't it? Commented Sep 6, 2016 at 22:14
  • 2
    @Hans Passant: merely joking about the tag merge. The issue is that C++ made an hostile takeover of C. Newcomers don't really see that and just believe C is part of C++. But it's certainly not true for C programmers. The issue with questions is that if a question is marked C/C++ it will very likely be answered using C++. And what for the few cases where the questionner is really asking just about C ? Answering the C++ way wouldn't be an answer at all in such cases except if our answer is really two answers merged one for each language.
    – kriss
    Commented Sep 6, 2016 at 22:52
  • "And what for the few cases where the questionner is really asking just about C?" Then they wouldn't have tagged it C++. When people use both the C and C++ tags, they mean "the language that is a common subset of C and C++", which is how a large number of non-experts use C++, for better or for worse (worse). So yes, when a question is tagged with both, it's likely to get a C++ answer. That is correct. It is partly the result of our having a very active C++ community, but also very likely to be what the asker actually wanted. People who only care about C and know the difference use the C tag.
    – Cody Gray Mod
    Commented Sep 7, 2016 at 7:22
  • @Cody Gray: agreed. The only issue are when the tagging is changed by someone else than the OP or when questions tagged C are marked as duplicates of questions marked C/C++ (thus forbidding new C specific answers).
    – kriss
    Commented Sep 7, 2016 at 9:11
  • I don't believe your assumption that this would "forbid" C specific answers - an answer that only addresses C if the question was specified as either/both is still an answer and still a useful answer. Commented Sep 8, 2016 at 7:48
  • 1
    @Flexo: forbid is probably too strong but C style answers to C++ questions are often downvoted as "bad style". Thus if a C only question is marked as duplicate of a C/C++ question, I wouldn't expect C style only answers, maybe some answers explaing both behaviors. That kind of trouble of partially overlapping communities does not only happen with C and C++, there is a similar trend with Python2 and Python3 for instance. Smaller problem because both versions of python are closer to each other.
    – kriss
    Commented Sep 8, 2016 at 9:44
  • @kriss For a question tagged c and c++, the first thing I expect is the questioner put too many tags on it and actually wants one or the other. Sometimes this is "I am using C++ but will accept a C-style answer", more rarely it is "I am using the intersection of C++ and C", which are very different. And sometimes it is "I am asking some technical question out of curiosity and not a practical one, and want one answer for C and one for C++, only I don't even know they are going to be different answers". Commented Sep 9, 2016 at 18:33

2 Answers 2

27

Now what should be done? Basically who watches the watchmen?

Well, you do. You and your peers. That's why all of this stuff is public and you know what happened, when it happened, and who was responsible.

For trivial mistakes, just flag the question and explain the problem; a moderator will review it and correct it. You don't need to worry about which moderator handles the flag; any moderator who cares to do so can review the situation, and it's easy for them to get in touch with one another if input from the person who handled the merge is required.

For thorny issues where the accuracy of a merge comes down to personal opinion... Bring it up here on meta and let folks discuss it. Then, if there's support for reversing the merge, flag the post in question and link to the discussion.

Note that while merging is available to all moderators, unmerging requires employee intervention - in rare cases, things can get weird if answers or comments were added after-the-fact, so it's good to have someone around to help clean it up. That said, it's usually not a big deal, so any moderator needing to reverse their actions can just ping one of us in chat or via email and we'll get it squared away.

-19

In my view the merge absolutely was the right thing to do. Separating questions by "expert" and "beginner" level isn't helpful, it spreads the knowledge around thinly for what is clearly a topic of quite some interest. (For what it's worth I did discuss it in chat first too)

The way I look at it the answer to the question "which should I use?" is predicated and so intimately entangled with an understanding of the question "what's the difference?" that in this instance the overlap was significant.

Will some users favour one or other answer for higher/lower level of details? Absolutely, but by making sure people wanting to read about the topic find presentations of answers a different levels we can be sure that they'll find the one (or more) at a level that works well for them.

In terms of the language tags the 'master' question was tagged with both and yet your answer on the one tagged only already strayed into C++.

So in short I think the answers on both questions were complimenting each other, in terms of the writing and the conclusions very neatly so not merging/linking seems to be more on the harmful side than doing so. (I disliked the duplicate status, because that makes your answer less visible than it deserved).

By all means make some more edits if you want to add more detail, but in my view it (and the other moved answer) already make perfect sense there and should help more people understand the overall question better.

4
  • 15
    It's not that it's an "expert" and "beginner" version of the same question, rather there are two different questions, one of which happens to be simple, the other fairly complex. One question is about using exit in main, the other about exit anywhere. Those are pretty different in their answers. Also, relevantly, you merged the answers into the more specific question, not the more general one, so it just reads as if they're going largely off topic from the question asked.
    – Servy
    Commented Sep 6, 2016 at 21:28
  • While I could potentially see an argument for a duplicate closure (and even then, only the more specific question as a duplicate of the more general one) merging seems quite off, as, due to the differences in the scope of the question, there are now many answers that simply don't match the question they are posted to.
    – Servy
    Commented Sep 6, 2016 at 21:30
  • 2
    I don't trust tags anymore in C or C++ questions because far too many people like to add one, both, or even change C to C++ when it is clearly not a C++ question.
    – wheaties
    Commented Sep 7, 2016 at 15:13
  • 15
    We should just accept that most c++ is badly-written c and merge both into c-or-maybe-c++, @wheaties
    – Shog9 Mod
    Commented Sep 7, 2016 at 16:18

You must log in to answer this question.

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