Live data from Hacker News

ES6: The features I'm most excited about

justicen.com

141–144 of 144 posts

Re: ES6: The features I'm most excited about

#141

Earlier quoted context omitted.

Browsers 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.

On 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.

This 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.

Re: ES6: The features I'm most excited about

#142
post #104

Earlier quoted context omitted.

Can someone explain the reasoning behind having any kind of backwards compatibility? Who would pick a worse-but-compatible ES6 over a better incompatible version? For example, the scoping rules: why have two separate scoping rules for let and var? To put it another way, would ES6 have let and var with differing scoping rules if it was designed today? If not, then it's a flaw (any difference from what a clean redesign…

Python 3

Exactly what came to my mind

Re: ES6: The features I'm most excited about

#143
post #5

Wow. I can't believe template strings ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... ) aren't in this list. I'm incredibly excited to start having those at my disposal.

is there pythonesque """ """ triple quotes for literal whitespace?

    var multi_line = 'You already \
        can do this in ES5.';

Re: ES6: The features I'm most excited about

#144
post #85
post #13

Earlier quoted context omitted.

Hm, at first glance I am as well, especially with tagged template strings. Those look particularly simple but powerful. Generally though, is it reasonable for features such as these to be included at the language level? I primarily use ES5 JavaScript so I'm used to pulling in a decent amount of modules (in this case handlebars, underscore, etc.) for things like templating. But I will be relieved to have a language-st…

I too was reluctant of using many of the new ES6 features, but as I've begun to adapt them I've come to appreciate them a lot! In fact, when using Babel to compile ES2015/2016 you can in many cases rid yourself of things like Underscore/lodash[1], Promise libraries, etc. I've recently started a new project in React/Flux, and I've cut away 3 or 4 dependencies compared to previous projects by fully embracing ES2015/201…

lodash has ~200 modular methods. That means it covers much more ground than the handful of ES5/6 built-ins provided and because it's modular you can use what you need without the stuff you don't.
Post reply on HN