Hi Everyone, Just to add some out-of-the-browser perspective to the discussion, and since Node.js was mentioned by name in this thread, I believe it is important to note that the package manager for Node.js absolutely *depends* on the automatic semicolon insertion working just the way it works today.
The only places where semicolons are ever used in the Node.js package manager are in the 'for' loops headers and at the *beginning* of the lines that would be interpreted incorrectly because of the lack of the semicolon at the end of the *previous* line - for example see: https://github.com/isaacs/npm/blob/master/lib/utils/read-json.js#L320-L336 There are no semicolons at the end of lines *at all*. Also the commas in multi-line arrays and parameter lists are always written at the *beginning* of lines so Node also depends on the ASI *not* inserting semicolons if the next line starts with a comma or other operator. I'm sure that I'm not the only developer that tries to follow the best practices taken from the Node community so there will be more and more new JavaScript code being written without semicolons and so in my opinion it cannot be considered as a problem of old and legacy code only. Just to give some perspective - I am not trying to advocate using, not using, or changing the ASI. In fact I was writing JavaScript since the late nineties always using explicit semicolons until I found Joose, a modern object framework for JavaScript that recommends not using semicolons so I followed the recommended style with my best intentions. The style recommended by the Node.js package manager only reinforced my belief that this was in fact the modern way of writing JavaScript, not the legacy way. Now I see plans to deprecate or remove the ASI just like if it was used in old code only, while in my experience it's the opposite - old code uses semicolons and new code doesn't - Joose and Node.js all being very modern. With all due respect, please consider any changes to the language from the perspective of modern frameworks like Node, Joose and I'm sure many others. Or is the Node community wrong in recommending the use of the ASI because it is or will be or might ever be deprecated or changed? And since I am quite confused - should I stop omitting semicolons, despite the style used by Node and Joose? What is the safest way of writing code if I want to make my code work in the strict mode of new versions of ECMAScript in the future? What if I want to contribute back to the Joose and Node.js community? My best regards to everyone involved in the evolution of ECMAScript. Thanks, -XCV.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss