In general I think it does not make sense to make C and C++ questions as duplicates of each other and obviously potentially merge them. I see this happening often enough that I thought it made sense to bring it up for discussion and see what the rest of the community thinks.
This was topic was brought up before for a specific set of cases in this thread Should these related C and C++ questions be marked as duplicates?. It was theoretical since none of the questions were actually marked as duplicates and it did not seem to illicit much discussion, probably because the answer in those cases was obviously no.
To make it more concrete, I have a specific case of what seems like a bad duplicate and merge. I answered this question on alternative tokens(Is there any difference between “&&” and “and”?) which was tagged as a C++ question and was subsequently marked as a duplicate of two questions, one of them tagged as a C question and then soon after it was merged with the C question( “&&” and “and” operator in C).
I can see how it seemed like the answers should fit both questions well. The reality is that it took a rather large edit to make my answer fit the merged question. This was mainly due to difference in the way alternative tokens are supported in each language but also because the question's code had subtle issues not apparent at first. It ended up working out fine in the end but it still seems like a questionable merge. I am not sure it was an improvement over having separate questions and some the answers were never edited and still don't fit the new question. The other duplicate was tagged with C++ but the questions were different enough that I don't think it made a good merge candidate either.
Marking the original question as a duplicate of a C question and merging in this case seems to be out of sync with the accepted answers to these questions:
- Are there guidelines on direction for merging questions (which question to close/merge?)
- When is a duplicate question not a duplicate?
- Closing as Duplicate When the Answers are Duplicates
I don't think this was a desirable outcome and more generally should we discourage this type of duplicates and merges between the C and C++ tags? From my experience I see questions tagged with only C or C++ marked as a duplicate of the other maybe a couple of times a week. So it is not happening all the time but it is not rare either. I have not seen other merges like my example although but I suppose merges could happen later on. Here are a few example of questions with only C tags that have a duplicate listed with only a C++ tag. Going from C to C++ in general seems more problematic since C code should work in C++, it is not the case going the other way:
- C - Random numbers between 10 and 30
- Using R random number generators in C
- What does less than 0. (0 dot) mean?
- Returning two-dimensional array in C function?
- draw rectangle with OpenGL on desktop(or any window in general)
It was difficult to find examples that I didn't think would be subjected to down voting if I linked them here but you can easily find more, I used
closed:yes is:question and then manually checked the duplicates.