I see two camps here - people who fear the unknown or come from semicolon-mandatory languages and can't get used to the semicolon-less style, and informed people who don't fear to embrace what is aesthetically more pleasing and logically more sound, despite the persecution by the members of the first camp, which I'd say also happens to be more religion-prone.
In JavaScript, semicolons reduce ambiguity. Whether you know the semicolon rules in the language or not is immaterial to reducing ambiguity, similar to how defensive parenthesization is helpful regardless of whether you know the order of operations of a given language by heart. This is why the prevailing wisdom is to always use semicolons: principle of least surprise.
The nonsense about "persecution" and "more religion-prone" is just that. "Informed people" -- "aesthetically more pleasing" -- "logically more sound" -- ad hominem and begging-the-question horseshit. Do better.
exactly. be an evangelist, not a brogrammer.
http://okasaki.blogspot.com/2008/02/in-praise-of-mandatory-i...
I'll grant you that's not a large scale experiment on a peer reviewed paper. But I trust Chris Okasaki on this one, and to me, his experiment counts as strong evidence against semicolons and brackets. (Specifically, semicolons and brackets are error-prone, especially for beginners.)
Now for Javascript, I'd probably write the semicolons. Because there is some ambiguity in the way we humans would parse Javascript without semicolons. But really, the root of the problem is that Javascript's syntax is suboptimal. Sure, Dennis Ritchie didn't know better at the time he wrote C, but this is no longer an excuse.
If I had a say, I'd simply write an alternative syntax with mandatory indentation. It's not hard[1]. If Bootsrap's maintainer dislike semicolons so much, he probably should do so as well. He will likely lose contributors, but someone who cannot get past a Python-like syntax is probably not someone he would want to work with anyway.
[1]: http://www.tinlizzie.org/ometa/ (Quite the tool for the job. Plus, it already features a Javascript parser you can modify.)
Re-reading my post, I find 2 potentially offensive excerpts:
"Dennis Ritchie didn't know better" Assuming mandatory indentation is superior, this one is flatly true (and there are other things to be said about the syntax of types). But I'm not saying he could have known better. As far as I know, no one knew better at the time.
"someone who cannot get past a Python-like syntax is probably not someone he would want to work with anyway" I apologize for this one, but I am personally fed up with people who won't use provably superior technology just because it would break their habits. Enforcing indentation in Javascript would be a minor syntax change, that can be learned in minutes and mastered in a day. I'd be wary of someone who refuses to make the leap despite the evidence for it. I must admit however that I'd understand if they just didn't believe in the evidence. (but then we can talk).
In your estimation, is there a difference in experience between those JS coders who are knowledgeable of ASI and those who aren't?