10

Do we benefit from keeping syntax-error questions open? If not, should those be closed?

Many questions that are of the "this is not working" kind (insert language tag you want here), end up being answered by "you missed a semicolon in line 12" or "you have an extra ending curly brace after the if–else block".

These are legitimate questions, and legitimate answers, but I fail to see what would be the benefit for anybody else reading the question and then finding out that it's just a syntax error.

I know that nothing can be done before the answers show the mistake (nor do I think that anything should be done), but, once it's been answered, the asker already benefits from the answer and probably corrected the mistake.

What is the point of keeping those questions open?

2
  • One reason I can think of is that when another syntax error happens that is closely related to the first one, the OP can edit his/her question with the new error (adding, not overwriting) and get new answers. Commented Apr 13, 2011 at 7:54
  • @Shadow that would not work, because the question would be either 1) already marked as answered (and thus not too many people would try to answer it) or 2) the answered mark would be removed to allow new answers, which is unfair for the original answerer. In either case, all the answers to the original question would not make any sense or, at best, would not be complete in the new context, creating more confusion than knowledge.
    – Aleadam
    Commented Apr 13, 2011 at 20:47

2 Answers 2

10

If it's about a specific error code that can be somewhat narrowed down, it's ok-ish.

If it's about "oops, I forgot to put a semi-colon at the end of a line", then I don't see any value in it, and it should be flagged for deletion.

3
  • So you suggest deletion? I did not even dare to go that far! Why do you think deleting the question is a better action than just closing it?
    – Aleadam
    Commented Apr 13, 2011 at 20:49
  • @Aleadam: Apart from differently-worded duplicates, why keep a closed question around (after a grace period to allow reopening after edits or by dissenters)? If it's a good question, why not keep it open? If it's not a good question, why keep it around at all? Commented Apr 13, 2011 at 22:41
  • @gilles "It’s important to note here that closing a question is a step on the road to deletion." from early SO history books blog.stackoverflow.com/2008/12/i-move-to-close-this-question Commented Apr 13, 2011 at 23:13
-1

I've actually noticed a pattern with certain syntax errors. People oftentimes make the same mistakes.

I've oftentimes found solutions to my problems in the most unlikely places. For instance, while searching for the solution of one problem, I've stumbled upon the answer somewhere else. For instance, I may have stumbled upon a question once where a user complained of a problem she faced while using a certain function incorrectly and getting a certain exception.

Weeks or months later, I've run into problems where previous questions or answers I've read have been a benefit to me.

In short, these questions and answers may not be helpful at the time, but everything we read and learn gets put into our toolbox and is used to solve problems that we face in the future. Run into other people dealing with semicolon problems enough and you'll likely consider this when you face problems of your own, however generic they may be.

3
  • 3
    Disagree. The way those "I forgot a semicolon" questions are worded make them useless for later searches, because at the time the user asks the question, they don't know what the problem is. The question titles will be something like "Why doesn't this work?"
    – Pekka
    Commented Apr 13, 2011 at 9:16
  • 1
    @Pekka yes, exactly my point. Besides, if you know the syntax of the language, and you know that there needs to be a semicolon after each command, then you don't need to read in a post that a semicolon is needed after a specific one. Of course, we all make mistakes and create bugs, but I don't see how two people may forget the same semicolon after the same command and on top of that being able to search for it and find the right post...
    – Aleadam
    Commented Apr 13, 2011 at 20:52
  • Semicolon is a lame example. I used it because everyone can understand it. Now, think about some concept you learned while working on some project that also applied to another problem you were facing. We learn by associating new concepts with things we already know and then commit them to memory.
    – jmort253
    Commented Apr 14, 2011 at 6:09

You must log in to answer this question.

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