25

The question concerns a specific type of posts of which this one is the latest example I stumbled upon: Ruby like ranges in JavaScript?

I've seen a couple of posts like this one, the ones that ask whether there is a specific built-in method to do a very specific thing. This in itself is obviously fine, but often the OP doesn't accept any alternative way of accomplishing what they wanted, like suggestions to build their own custom function or using a library.

On one hand it feels like a question like this one should be legit. It asks a specific thing, it's not too broad, and it's clear. On another hand, it seems that these posts, bound by strict "answer conditions" posed by OP, often have a simple "no" answer and thus don't have much value to the community, since they don't offer a solution to the problem.

To sum up, the question is, should posts that are "too narrow" in terms of solutions acceptable to an OP be allowed, or is it expected that OP should accept reasonable workaround for the problem?

EDIT, since this question was marked as duplicate.

The duplicate post suggested is quite similar, and certainly overlaps with this one. But the questions I am talking about are not necessarily yes/no (although a lot of them happen to be). They are just too narrow in terms of possible solutions because the OP enforced too many constraints. And my question is whether posts like that are useful in any way.

13
  • 5
    Possible duplicate of Where is the line for yes/no questions?
    – yivi
    Commented Apr 14, 2018 at 17:52
  • @yivi, That's a good find, and does deal with a lot of what I am asking here. But the questions I am talking about are not necessarily yes/no (although a lot of them happen to be). They are just too narrow in terms of possible solutions because the OP enforced too many constraints. And my question is whether posts like that are useful in any way.
    – ivanibash
    Commented Apr 14, 2018 at 17:57
  • 3
    @yivi While that question is relevant, what we have here isn't quite a yes/no question. A "yes" answer, if it actually existed, wouldn't be a simple "yes" (e.g. "Yes, the syntax for writing your range is [<1..10>]").
    – duplode
    Commented Apr 14, 2018 at 17:59
  • 1
    Since there is no specific close reason for this type of questions currently, they must remain open but you may downvote them still. You could also ask on meta if there should be a specific "too simple" close reason. Commented Apr 16, 2018 at 14:49
  • 2
    Seems totally reasonable and normal question.
    – Fattie
    Commented Apr 16, 2018 at 23:58
  • 1
    And I think what we forget in this discussion is that we would also like answers to be usefull for future reference as well. So an answer like No, but you could build this custom library/function etc. might not be usefull to the OP, as perhaps it exceeds his/her capabilities, but may very well be helpfull to others. Given that the question is well written and thus findable.
    – Luuklag
    Commented Apr 17, 2018 at 11:55
  • 1
    In my opinion the question is both valid and reasonable, but the community seems to have different opinion. I have seen similar questions (mostly concerning javascript features) downvoted to the ground with reference link to the Ecmascript 2015 standard saying that everything is there. Well, if you are a newcomer, good luck reading through that. Commented Apr 17, 2018 at 12:55
  • @MatusDubrava Well-formulated questions about e.g. corner cases of standards are valid, reasonable and useful. If, in the tags I'm active on, I saw them getting excessive downvotes, close votes or dismissive comments of the kind you describe, I would definitely call them out.
    – duplode
    Commented Apr 17, 2018 at 13:43
  • @MatusDubrava don't you think though that posting a "does this exist" question is a bit lazy though? I mean SO does have a guideline saying that you should show your efforts. If googling a method reference doesn't fall under that category then what does?
    – ivanibash
    Commented Apr 17, 2018 at 14:02
  • @redFur To answer your first question. If someone asks if there is a solution to halting problem, then what is the proper answer if not - there is none? Sometimes there is no solution for problem that OP is facing simply because that problem is either too complicated or artificially made nonsense (or missing feature). In such cases, the answer such as - there is no solution - is completely valid in my opinion. Although providing different solution or workaround should be encouraged, simply because other people might find it useful if they stumble upon it while googling for an answer. Commented Apr 17, 2018 at 15:33
  • @redFur And about that googling. I am not talking about stuff that can be googled in few minutes. But let's be honest, almost any question about any feature of any technology is already answered in some document. The question is how much time you should spend googling before asking it here. Google is useful when you are searching for something that is known by general audience but try to google something that only small group of people finds useful. Most probably it is there, but you might spend lifetime looking for it if you don't know the exact keywords. Google is not solution for everything Commented Apr 17, 2018 at 15:42
  • Sorry shouldve been more specific. When I said "does this exist" i meant it in the context of this post, as in, questions that simply asking about built in methods are more often than not can be closed in my opinion for lack of research effort (there may be exceptions of course, maybe it's a new feature, or maybe there is a non-obvious way of doing it in a particular language.) I agree that google is not solution for everything but definitely is for this type of thing.
    – ivanibash
    Commented Apr 17, 2018 at 16:04
  • @redFur Lack of effort isn't a close reason, though it sometimes leads to close-worthy issues. Cf. this answer (specially the final paragraphs) and this question (from the Math.SE Meta, but relevant anyway).
    – duplode
    Commented Apr 17, 2018 at 19:22

1 Answer 1

28

Yes, the question is valid. This kind of situation is rather similar to XY questions, in that the question author has added a restriction that makes it trickier to write an useful answer that addresses the question in its original formulation. It is worth noting this kind of question doesn't necessarily have to be answered with a simple "no". If the motivation behind the specific request of the OP is clear, an answer of the form...

No, there is no built-in syntax for doing this. A reasonable approximation to the compact way in which you'd like to write it is [...]

... is acceptable, as it would be in a XY question.

P.S.: For a few additional notes, see this answer I once wrote addressing another kind of XY-esque situation.

4
  • 2
    I find it disturbing that on one hand we bombard people who don't do their research with downvotes and links towards the help center and on the other hand questions like these are valid. OP could've read basic introduction in javascript to see if there is a builtin way to do this.
    – Adelin
    Commented Apr 17, 2018 at 4:23
  • 7
    @Adelin an introduction to a language can teach you some things which are available. It's very unusual to concretely tell you what there is not (especially relative to some other language) Commented Apr 17, 2018 at 6:36
  • 1
    @Adelin Also (this is in general, not specifically about the SO question linked in this meta question): if you don't know whether a language has a specific feature/function, it can be hard to be certain whether not finding that feature/function is because the language doesn't have it, or because your search-engine skills haven't been up to the job. Especially true where a language has many "standard" and even more "semi-standard" libraries to choose from.
    – TripeHound
    Commented Apr 17, 2018 at 12:20
  • 1
    @Adelin That might be a reason for downvoting (but see the points raised by Nick Cardoso and TripeHound); however, it doesn't justify closing.
    – duplode
    Commented Apr 17, 2018 at 13:07

You must log in to answer this question.

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