12

For example, We have this C question here:

Is there a benefit/downside to return in an else statement?

which was closed as duplicate of this Javascript question:

Unnecessary 'else' after 'return'. (No-else-return)

because it shares the same concept of a coding-style issue and in C we have no appropriate duplicate question to hand already.


But apart from the context itself,

  • Is it appropriate to close a question as duplicate of a different tagged language question? For example to close a C tagged question as duplicate of a Javascript tagged question?

My personal feeling is that the close is inappropriate. A simple Link or a mark as "Related" would be more matching. But that is just my opinion.

6
  • 11
    In general, I agree it is not appropriate to close a question as a duplicate of a question asked about a different language. But note that the asker of this particular question agreed that the proposed question answered theirs. Anyway, I added several other dupes that are a bit more general. May 27, 2020 at 9:12
  • 3
    I think that heavily depends on the question. In this case it was about coding style, and in my opinion that would generally be an example where it is not appropriate to close as duplicate. That's because what's best-practice in one language might very well be considered an anti-pattern in another (like casting the result of malloc, which is mandatory in C++ but an anti-pattern in C). Of course that isn't really the case for this particular question, but still worth considering.
    – Felix G
    May 27, 2020 at 10:34
  • 2
    On a related note: should questions about coding style be closed as opinion-based? (since there isn't really an official "correct" coding style for most programming languages)
    – Felix G
    May 27, 2020 at 10:46
  • 2
    @FelixG - Yes, I wanted to answer you regarding that to your first comment myself but didn´t do it in the first place. The difference here is that the OP asked for if there is a fundamental difference between both methods. S/he didn´t explicitly asked for the difference in the manner it would be coding-style. It just later turned out to be a coding-style question. Thus, the vote to close as opinion-based would, IMHO, not be appropriate here. If OP had asked with the knowledge that there is no technical downside or advantage for one case, I´d vote to close as opinion-based. May 27, 2020 at 10:57
  • 1
    related : meta.stackoverflow.com/questions/290046/…, meta.stackexchange.com/questions/226583/…. Answers in other language were considered "okay" as they show the "pseudocode". But for dupe it really depends on the question. May 27, 2020 at 11:10
  • 1
    @RobertSsupportsMonicaCellio good point. So i guess in this particular case, because of the way the question was worded, there actually was a correct (and not opinion-based) answer: "it doesn't matter". And that people still decided to throw in their personal opinion is not OPs fault, because they didn't actually ask for that.
    – Felix G
    May 27, 2020 at 11:15

0

You must log in to answer this question.