Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are numerous cases where lack of semicolons create ambiguous code which introduces bugs.

Here are some: http://gist.github.com/612814

Edit: Er, tried to paste code in-line but formatting got messed up.



Well, the code isn't actually ambiguous (since the spec states well defined behaviour), just very easy to misinterpret.


Ambiguous to a human, vs. a compiler.


Ambiguous to a human who doesn't understand the rules of automatic semicolon insertion. Maybe such a human shouldn't be using javascript in the first place, instead of working in fear.


Human doesn't understand complex rule with counterintuitive corner case. Film at 11.




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

Search: