4 ms·
> Can someone explain the reasoning behind having any kind of backwards compatibility? Not breaking millions of websites.
by Touche 11y ago
> Can someone explain the reasoning behind having any kind of backwards compatibility?
Not breaking millions of websites.
- pluma 11y ago*billions. Maybe even orders of magnitude more than that.
- alkonaut 11y agoIn what way would a cleaner ES6 break websites? Browsers aren't going to stop supporting ES5.
- bzbarsky 11y agoBrowsers aren't likely to implement two separate languages either. Furthermore, forcing people to pick between "ES5" and "ES6" if they just want to use a single ES6 feature is pretty bad. So your fundamental choices are really an ES6 that is backwards-compatible or an ES6 that is not used.
- alkonaut 11y agoOn the other hand forcing newcomers to learn the warts of ES5 when they could learn what is becoming a reasonably elegant language isn't ideal either. Two scoping rules, for example. An ES-latest runtime + transpilers would be all that browsers needed.
- bzbarsky 11y agoThis has in fact been debated back and forth on the es-discuss mailing list and in TC39, especially given experiences with strict mode. The decision was generally made to not have more modes and to just have a single JS language. You don't have to agree with that decision obviously, but this isn't something that happened willy-nilly.