r/javascript • • Apr 01 '18

Google publishes a JavaScript style guide. Here are some key lessons.

https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714 Upvotes

317 comments sorted by

View all comments

Show parent comments

8

u/gearvOsh Apr 01 '18

ASI is not future proof for new proposals and features. That's why it should be avoided.

0

u/Mingli91 Apr 01 '18

Got a source for that? If TC39 are scared to break an outdated library that nobody uses anymore then I’d be surprised if they change something so fundamental about the language.

10

u/CiezkiBorsuk Apr 01 '18

ASI is not a fundamental feature at all. It's literally a fallback mechanism, designed to allow browsers to not fail immediately on badly written code.

It's a quirk akin to old JS engines not throwing ReferenceErrors on undeclared variables - only it's much harder to get rid of, because some developers decided to abuse it, because their favourite language doesn't use semicolons at all.