2 ms·
I recommend reading the following articles before you assume that omitting semicolons is dangerous. An Open Letter to JavaScript Leaders Regarding Semicolons h
by feross 11y ago
I recommend reading the following articles before you assume that omitting semicolons is dangerous.
An Open Letter to JavaScript Leaders Regarding Semicolons
http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding http://blog.izs.me/post/2353458699/an-open-letter-to-javascr...
JavaScript Semicolon Insertion – Everything you need to know
http://inimino.org/~inimino/blog/javascript_semicolons http://inimino.org/~inimino/blog/javascript_semicolons
Are Semicolons Necessary in JavaScript?
https://www.youtube.com/watch?v=gsfbh17Ax9I https://www.youtube.com/watch?v=gsfbh17Ax9I
Spreading FUD doesn't help anyone out.
- voidr 11y agoI know I can write a working JS application without semicolons, however I can also write a working JS application where with `eval` and `with`. The issue is not whether or not one individual can learn to use dangerous feature X. If you are writing code by yourself for your own use, you can use nested eval's and no semicolons with a little bit of `with` here and there, nothing wrong with that. However when you are writing code that is supposed to be developed by people other than you, you might want to write less clever code. I could write code without semicolons, however that would mean that I would have to constantly keep an eye out for that case where I absolutely need to add it to prevent ASI from doing the wrong thing. It takes probably 100ms to hit that semicolon key, however it takes a lot more time to debug code without semicolons. If you hat semicolons with a passion for some reason, you could use Coffee Script or some other language which was designed without semicolons and has clear semantics around it.