4 ms·
I write semicolon-less code and, in my experience, there isn't a JavaScript interpreter that can't handle it. Come visit me at work and I'll show you a
by nixy 16y ago
I write semicolon-less code and,
in my experience, there isn't a
JavaScript interpreter that can't
handle it.
Come visit me at work and I'll show you a few JS implementations on various set-top-boxes that will freak out if you don't use semicolons.
- hackermom 16y agoSo in essence, the problem is still to be blamed on those specific JS implementations. Optional means optional, at which point making an implementation that demands the absence of semicolons is as bad as one explicitly requiring them, as both are breaking the set rule: optional. (personally, I'm for the mandatory semicolon, to avoid mistakes)
- nixy 16y agoYep, those implementations are crappy, but they are in production and deployed in hundreds of thousands of end-user systems. The author seems to have only been testing PC web browsers, which is not the only place JS is used. This is easy to forget, though.