Hacker News new | ask | show | jobs
by david-given 4125 days ago
Optional semicolons is my biggest hate with Javascript --- combined with expression statements silently discarding their result, it makes this kind of mistake far too easy to make.

Personally I've never understood with Javascript strict mode doesn't make semicolons mandatory.

1 comments

Isn't strict mode purely semantical? IIRC you can implement a use strict pass purely on the AST, after the parser.

It's not an excuse, of course.

Bah. You're absolutely right, of course, that's why strict mode won't help.

Now I find myself wishing there was a stricter mode. <script type="text/sensible-javascript">, perhaps...