If I have an answer with two different languages or with the same language but two different versions, is it better to post one answer including both codes or two answers each with one code?


2 Answers 2


It depends.

If they are radically different, then yes, you should post them as two separate answers. For example, this answer and this one.

However, if they are very similar, then they should both be in the same answer. For example, note that both answers linked above actually have two solutions, because they were very similar.

  • \$\begingroup\$ This. You have to use a certain amount of sense about it, but I'd default to one answer unless there was a reason. Full disclosure: I also have a instance of two answers: 1 2. \$\endgroup\$ Feb 15, 2014 at 15:56

Absolutely post separate answers for different languages.


For same language use common sense. Are they different enough that people will want to be able to vote for them separately?

If someone comments that they should be the same answer, consider merging them into one and delete the other.

  • \$\begingroup\$ And what about two identical answers, except they are literal translations of the other? (example: codegolf.stackexchange.com/questions/20996/…) \$\endgroup\$
    – Justin
    Feb 19, 2014 at 9:32
  • \$\begingroup\$ @Quincunx, that should be 3 answers so people can vote and more importantly comment on them without the threads getting tangled up. \$\endgroup\$
    – gnibbler
    Feb 19, 2014 at 10:16
  • 2
    \$\begingroup\$ And what about non code-golf questions, especially popularity-contests, where you might want to impress your peers by submitting multiple solutions in one answer? \$\endgroup\$
    – SztupY
    Feb 19, 2014 at 16:34
  • \$\begingroup\$ @SztupY, I've done those things, so it must be ok. Are you worried about people getting too many imaginary internet points? It's better to keep each answer separate with it's own collection of comments and votes. \$\endgroup\$
    – gnibbler
    Feb 19, 2014 at 20:58

You must log in to answer this question.

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