ES6, err ECMAScript 2015, is official!

The 109th General Assembly held in Montreux, June 17, 2015, approved the following documents:

  • ECMA-262 6th edition - ECMAScript® 2015 Language Specification

Source: http://www.ecma-international.org/news/index.html

People have already been using it for some time now thanks to transpilers like babel (which is picking up a lot of momentum, even now getting into React: http://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html), and browsers even have some of the new features natively implemented today. I assume we’ll start to see more faster now that its official.

Of course its not all sunshine and roses: The ES2015 Nightmarefile - performance, web standards - Bocoup

On a personal note, I’m especially fond of this line:

if (i === current === delete function() {}.length) {

What does that line of code even mean?

obviously it means if (i !== current), uh - duh! :wink:

delete function() {}.length resolves to the success of deleting the length property of an anonymous function. This will currently fail (can’t delete length) so you get false. That gives us: if (i === current === (false)) {

Strict equality is evaluated left to right so if i is equal to current we compare (true) === false which is false. If i is not equal to current we get (false) === false which is true :smiley:

I prefer 6 to '15, but the name change is a weird posturing/branding effort, sort of like telling your friends you bought a gym membership.

Using Babel or iojs --harmony is still annoying. I’ve been using a save-hook transpilation type thing in Atom and it’s okay, but it’s not great with multi-person source control, and .babelrc files make some weird assumptions about your workflow which makes them an annoying tool to use in that shared situation too.

In some sense with all of these pragmatically necessary compilation steps it doesn’t really matter that ES6 is the blessed browser language at this point; might as well write my webapps in unsafe C plus emscripten or asm.JS or WebAssembly. :trout:

Yeah, I definitely feel this way sometimes. Well not the WebAssembly part. I have no intention of writing WebAssembly :wink: