Hacker News new | past | comments | ask | show | jobs | submit login

I would just like to point out that people tend to blow the semicolon insertion thing out of proportion. For braces it really only comes up when returning object literals and for other things there are just a couple of features that can bite you (starting lines with parenthesis or array literals and so on)

http://inimino.org/~inimino/blog/javascript_semicolons

Sure, its best to always explicitly use semicolons but its not as dangerous to forget them as most make it sound.




While semicolon insertion itself does cause many problems, the mere fact that it exists as a "feature" of the language is perhaps a bigger problem.

There's no justifiable reason for it to exist. The drawbacks should have been clear from the moment the concept arose, and it should have been scrapped before ever having been implemented. That's the only sensible response to it, after even a minimal amount of analysis.

A missing semicolon should be treated as an error, causing the execution of the script to be immediately halted, and the programmer notified of it. It is as simple as that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: