5

I recently had one of my language-comparison questions closed for being too broad. The goal of the question was to attract answers comparing the features of two very similar generic function systems, to see how they differ. The comments had some plausible answers, but now that I've had that question closed, it occurs to me that it's very difficult to make a language-comparison question that isn't inherently broad. I considered adding a qualifier to the question like "what are the major differences?", but that would put the question as risk of becoming opinion based.

I'm now clueless about how to properly write questions with the language-comparison tag, so I'm looking for some advice: How can language-comparison questions be asked without them being too broad?

6
  • 1
    Related: Clean up the [*language*] tags Commented Mar 25, 2021 at 15:18
  • 21
    They can't. So don't ask them :). Commented Mar 25, 2021 at 15:34
  • 7
    I'd say that the only way these questions can really be on-topic on SO is when they're scoped to a very narrow domain, like a single function or class. Eg. "How do arrays in Java compare to arrays in JavaScript?" or similar. This keeps the discussion focused on a single problem, rather than 30 different differences,
    – zcoop98
    Commented Mar 25, 2021 at 16:33
  • 9
    "What is the difference" is a pretend question. If you don't know what each thing is, you should be asking about being stuck in some presentation. If you do, where are you stuck in giving "the difference"? You're just asking us to write a precis for you after no research effort by you. Anyway determining what is "different" & "the same" almost always requires abstraction, but the nature of the abstraction is very seldom determined by the things compared, so is unclear. Again, you are asking us to decide that for you. (Similarly, "why" is almost always not a real question.)
    – philipxy
    Commented Mar 26, 2021 at 2:11
  • 1
    This seems like a bad tag to begin with. It's hard to compare different languages without the question getting very broad.
    – Lundin
    Commented Mar 26, 2021 at 8:45
  • 2
    It's funny, the premise of the tag sounds opinion-based to me... ?
    – Clockwork
    Commented Mar 26, 2021 at 9:23

1 Answer 1

13

This might seem obvious, but the best way to avoid the question being too broad is to narrow the scope of the question as much as possible. You have to be more careful when it comes to language comparison questions, because there might be a lot of differences, and those are not questions that can be reasonably answered in a Q&A format. To be on-topic, the question would have to be about a specific keyword, or specific functionality in those languages.

Your question is asking about the difference between how two languages specify objects and classes, which is basically asking how the two languages deal with Object Oriented Programming, and that's too broad. Also, avoid asking things that can be construed as opinion-based, such as "What can one do that the other cannot?". This is a little hard to answer objectively, and could very well lead to the question being closed. A similar question that is also too broad would be What are the differences between the type inference of Scala and C++11?

There are some examples in the tag of questions that are sufficiently focused to be on-topic. For example, What is the difference between the const qualifier in C and the const qualifier in C++? asks how a specific keyword is different between two languages (that are admittedly more related than the average pair of languages). Another example would be What is the difference between Java's equals() and C++'s operator ==? which is about different syntax that appear to be doing the same thing in different languages.

The tag info actually covers the intended usage quite nicely, so I won't repeat it here. Unfortunately, most of the questions with that tag are actually asking how to implement feature X in a different language, which seems to be a misuse of the tag, since they are code translation questions. There aren't actually many on-topic language comparison questions probably because it's in fact, fairly hard to ask an on-topic question of this nature.

11
  • I'm on the fence about the second paragraph. The premise of my closed question is my sincere belief that the two systems in question are basically the same. If I'm right, then the answers shouldn't need to be massive. If I'm wrong, then they very well might be. I'm not sure how to resolve that, or if said problem means that my question is doomed from the start.
    – J. Mini
    Commented Mar 25, 2021 at 17:54
  • 2
    @J.Mini Actually I doubt very much that those 2 systems are basically the same. I don't really know too much about the details, but the issue is that those systems are quite large, and are probably quite complex. The problem is that the larger the systems, the more differences there are going to be between them. Perhaps you could try to narrow down your question to a specific aspect of the systems?
    – cigien
    Commented Mar 25, 2021 at 17:59
  • 2
    @J.Mini as for "give me a list of differences between X and Y" - there is roughly one ("give me list of differences between two particular minor C++ versions") question on SO that is not closed as "too broad" (as long as the question had enough attention to collect 3-5 votes). To give the question a chance you need to explain how resulting list would be provably small and complete (which is nearly impossible if you don't know the answer in advance)... Commented Mar 25, 2021 at 18:47
  • I have a problem with "there might be a lot of differences" (implying a lot of Answers), being a reason for not posting a question. How would someone know this without asking the question? I've recently run into one Q with 44 A's (stackoverflow.com/questions/53811569/…) and another with 20 (stackoverflow.com/questions/55939860/…), which were definitely on topic, even if they aren't a direct comparison to the language-comparison tag. Commented Mar 25, 2021 at 20:10
  • 4
    @computercarguy the "a lot of differences" doesn't imply "a lot of answers". It implies that each answer will have to be VERY large. Potentially too large. One could ask "how do I build my own compiler?" and we have whole books written on the subject. It's not at all reasonable to expect that such a subject fits as an answer.
    – VLAZ
    Commented Mar 25, 2021 at 20:34
  • 1
    @computercarguy Yes, there being a lot of potential answers certainly doesn't make a question off-topic, but that's mostly true for "how-to" questions (as the ones you linked to), where each answer could give a different solution while being a complete answer. A complete answer that covers the differences between big language features would be very large indeed, and not reasonable for how long an answer should be.
    – cigien
    Commented Mar 25, 2021 at 20:34
  • @VLAZ, but again, how does someone know that an Answer will be exceedingly long, unless they ask or unless it's obvious (like your "compiler" example). I've seen fairly simple and straightforward Qs end up with some significantly long As, simply because it was actually neither simple or straightforward. And "reasonable" is definitely objective, as this Q&A forum routinely proves. Commented Mar 25, 2021 at 20:43
  • 3
    @computercarguy "how does someone know that an Answer will be exceedingly long, unless they ask or unless it's obvious" research. We also have a closure reason that is going to inform them.
    – VLAZ
    Commented Mar 25, 2021 at 20:49
  • @VLAZ, the fact is that SO isn't supposed to care about how long an Answer is. meta.stackexchange.com/questions/59235/… Also, a Close Vote reason means that the Question has already asked, so again, how would they know they are going to get VTCs unless it's obvious? Commented Mar 25, 2021 at 20:58
  • 4
    @computercarguy 1. You keep focusing on the wrong things. I never said or meant that answers with higher word count are off topic. It's answers that have to cover too much stuff. They are too broad. 2. A question most certainly doesn't need to have been asked to be closed. Only if it's a duplicate and even then there is more to it. 3. You also keep ignoring research exists and is a prerequisite to asking a question. 4. If a user still asks a broad question...so what? It gets on hold until it's scope is suitably narrowed.
    – VLAZ
    Commented Mar 25, 2021 at 21:21
  • 1
    @VLAZ, 1. I'm only "focusing" on the things you state. You said "each answer will have to be VERY large", so that's how I replied. 2. And how can a Q be closed if it's not asked? 3. I never ignored research as a requirement, I asked how to expect a long Answer, which research often won't reveal or it would have prevented the Q in the first place. 4. I never said anything about a Q being too broad. You're reading too far into my comments and seeing things I didn't say. I asked straightforward questions and you avoided them or answered them in an illogical way. Commented Mar 25, 2021 at 22:01

You must log in to answer this question.

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