3 ms·
I found [this pull request] that adds language recommending the use of semicolons, but no proposals to require semicolons or to remove Automatic Semicolon Inser
by seniorsassycat 9y ago
I found [this pull request] that adds language recommending the use of semicolons, but no proposals to require semicolons or to remove Automatic Semicolon Insertion.
Removing ASI from ECMAScript would break backwards compatibility - modern JS engines couldn't run scripts that use ASI which would break a lot of websites that are alread deployed. ECMA will add features that won't run in old engines (older V8 can't parse arrow functions) but they won't add/remove/change features that break existing behavior.
Today there are code patterns where ASI is ambiguous, or at-least hard for a developer to grok. TC39 is warning developers that new language features will not be designed for ASI and might have confusing behavior if those new features are used without semicolons.
[this pull request]: https://github.com/tc39/ecma262/pull/1062/files https://github.com/tc39/ecma262/pull/1062/files