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

My understanding (though I'm not an expert) is that the way the JavaScript spec is written, you first try to parse a line as is, and if you encounter a parsing error in trying to do that and the line doesn't have a semicolon, then you insert a semicolon and you try again. The end result is that it's a bit different then semicolons being optional; they are instead inserted automatically to try to recover from parse errors.



FWIW, this is also the way O'Reilly's JS Pocket Reference explains it.


Thanks, that's what I had read.

I also found this set of tests http://jsperf.com/asi-versus-msi

My results on Opera Next (v15) http://imgur.com/hkAopfX shows MSI fastest FWIW.




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

Search: