11

After reading about the campaign to close questions pertaining to typos, I have to ask, what constitutes a typo? For example, I'm learning about writing shell scripts in Linux, bash, etc. Apparently, bash is really picky about syntax and as such

var = 5

is wrong, while

var=5

is right. Took me a while to realize what I was doing wrong (had this same problem with if's and loops) and SO questions such as this one were very useful in figuring out the issue. However, that question's answer ("You forgot the spaces") seems to me to be along the same lines of "you forgot a semicolon". Are questions such as this going to be closed? I feel there's a difference between someone forgetting a single item they should know (such as a brace or semicolon) and helping to explain the nuances of syntax. I would really like to keep these kinds of questions around. Where does the line lie?

(Apologies if a more concrete answer has already been decided. I looked at the initial request, but didn't see more than talking about single character issues)

1
  • You are not talking about typos. You are talking about code formatting. A typo would be 'lenght', for example. Jun 3, 2013 at 18:31

2 Answers 2

17

The example you mention isn't really a typo. A typo is a spelling mistake, caused by swicthing lteters aorund, omtting ltters, or innsreting addiitional onnes.

The bash error above is a syntax error more than anything else.

In other languages, it's more a point of style and readability, and is neither a typo nor a syntax error.

It might be good to begin socializing the definitions of each kind of correction:

  • correcting a typo
  • correcting a syntax error
  • improving readability by adding/removing whitespace

They're not interchangeable IMO.

1
  • BoltClock: Thanks for the edit. Much more readable. ;)
    – John
    Jun 3, 2013 at 17:33
7

When you vote to close on such things it's normally closed as Too Localized, or, you don't think that it will help future users or cause the OP to learn more about the language.

So, if you can (reasonably) imagine people thinking oh, I didn't know that detail about bash syntax then it's not too localized, but if it's always oh, it's just a spelling error then it is too localized.

Actually think about whether the typo matches the spirit of the reason. You don't have to just vote to close everything that you think is a typo. You're not a robot.

You must log in to answer this question.

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