4
\$\begingroup\$

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?

\$\endgroup\$

2 Answers 2

9
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\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\$ Commented Feb 15, 2014 at 15:56
1
\$\begingroup\$

Absolutely post separate answers for different languages.

https://stackoverflow.com/a/2407914/174728
https://stackoverflow.com/a/2406987/174728
https://stackoverflow.com/a/2408571/174728
https://stackoverflow.com/a/2414416/174728
https://stackoverflow.com/a/2408221/174728
https://stackoverflow.com/a/2413934/174728

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.

\$\endgroup\$
4
  • \$\begingroup\$ And what about two identical answers, except they are literal translations of the other? (example: codegolf.stackexchange.com/questions/20996/…) \$\endgroup\$
    – Justin
    Commented 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
    Commented 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
    Commented 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
    Commented 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 .