pragmas although not great and should be used sparingly, are still the most feasible way forward to limiting excessive features. that being said, es6 is such a different beast from es5, that i think a backwards-compatible “use es5” text pragma would be appreciated by the significant number of veteran frontend-programmers and established companies who still prefer writing and maintaining code in the “legacy” language-style.
this would effectively be a one-off pragma, as its unlikely future es versions would have language changes of such magnitude to warrant it. > On Jul 22, 2017, at 3:19 AM, Steve Fink <[email protected]> wrote: > > On 07/20/2017 03:08 AM, Alexander Jones wrote: >> Removing things also frees up syntax and names for future extensions. Never >> removing features is simply unscalable, and it's only going to accelerate >> JS's demise! >> >> I still think version pragmas are probably worth exploring to mitigate this, >> while not 'breaking the web' is a stated goal. > > Not breaking the web is a stated goal. > > A non-web embedding is free to remove whatever is unwanted, but the vast > majority of resources are put into JS engines that run the web, so in > practice you're going to run on engines that implement the whole spec and are > not at all eager to pay for testing or maintenance overhead for non-web > configurations. > > Features can sometimes be usefully deprecated by not implementing them in > optimizing JITs. (For example, 'with'.) Whatever invariants the features > break must still be handled by the overall engine, but it's usually much > easier to only handle things on slow paths. > > Version pragmas have been explored and found to be a bad idea. See > http://exploringjs.com/es6/ch_one-javascript.html for a far better > description than I would be able to produce. > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

