Live data from Hacker News

ECMAScript 2015 Approved

ecma-international.org

81–90 of 108 posts

Re: ECMAScript 2015 Approved

#81
post #16

If you've been focusing on another language for a few years, you might not recognize JavaScript anymore. It's pretty awesome now. Here's an example of what it looks like: http://pastebin.com/raw.php?i=yEB4mrty As someone who usually works with C, Scala, and Java -- I'm currently working on a small app built on ec6/7 babel, npm, jspm, system.js, aurelia, gulp, etc. It's been a great experience so far.

I've been away from JS for about 10 months and... cool, but, fuck, that changed quickly. Time to get caught back up to speed. Is ES6 now actually viable, in that it's supported by most users' browsers? If not, are there popular compilers for ES5?

You can use Typescript as well for an alternative to Babel, it doesn't have all the features Babel has (like async/await) but they are planned. And you get types at the same time.

Re: ECMAScript 2015 Approved

#82
post #12

Earlier quoted context omitted.

Because of their switch to use a year instead of a version number, do they plan on doing these ES enhancements more often?

I think that's the plan. Whatever the committee can agree on and ratify by December 2016 will be dubbed "ES 2016" and so on.

The plan is to keep releasing them mid-year.

Re: ECMAScript 2015 Approved

#83
post #13

What does it mean for a spec to be approved? Is it like a peer-review?

What approval means here is that it was ratified by the ECMA General Assembly. The move by TC-39 to send ECMAScript 2015 to the GA was voted on at the last TC-39 meeting around a month ago.

Re: ECMAScript 2015 Approved

#85

How long before we see widespread browser support?

With transpilers like Babel you can fantastic browser support today.

Oddly, it would be silly to transpile to ES5 forever. By the time ES6 support is widespread, we'll be transpiling from ES8, and so on.

Re: ECMAScript 2015 Approved

#86
Support for Octal numbers is insane (especially since uppercase O is supported as well as lower case o) e.g. 0O7. Add a feature that will need linting... wow.

Overall happy with many of the improvements (e.g. standard syntax for modules and classes).

Re: ECMAScript 2015 Approved

#87
post #29
post #16

If you've been focusing on another language for a few years, you might not recognize JavaScript anymore. It's pretty awesome now. Here's an example of what it looks like: http://pastebin.com/raw.php?i=yEB4mrty As someone who usually works with C, Scala, and Java -- I'm currently working on a small app built on ec6/7 babel, npm, jspm, system.js, aurelia, gulp, etc. It's been a great experience so far.

> "a small app built on ec6/7 babel, npm, jspm, system.js, aurelia, gulp, etc" Part of the problem with the Javascript ecosystem is that you have to use so many different tools/libraries to create a "simple" app.

You don't have to do anything. I think there are more people in the world that like to use tools for the sake of using tools that it would give one the impression that all of this tooling is a necessity. It's not.

Re: ECMAScript 2015 Approved

#88
post #16

If you've been focusing on another language for a few years, you might not recognize JavaScript anymore. It's pretty awesome now. Here's an example of what it looks like: http://pastebin.com/raw.php?i=yEB4mrty As someone who usually works with C, Scala, and Java -- I'm currently working on a small app built on ec6/7 babel, npm, jspm, system.js, aurelia, gulp, etc. It's been a great experience so far.

The only downside seems that if one uses new keywords like "class" one has to use a transpiler back to JS5 to avoid syntax errors in IE11 and other older still supported browsers&devices that will never receive an update (like Android 2x/4, Blackberry, WinPhone7/8, etc).

A fallback solution like JQuery isn't possible for new keywords. Try-catch keywords were previously introduced too, but are rarely used because their implementation is known to be slow. Beside that JS5 code with fallback functions still works fine in very old browsers like IE5.

Re: ECMAScript 2015 Approved

#89
post #55

Earlier quoted context omitted.

"Everyone" is using Babel now. A lot of ES6 features are making their way into browsers and node, but there's so much variation that a transpile step is needed. Babel is nice but currently quite slow. Babel has a REPL you can play with here: http://babeljs.io/repl/#?experimental=true&evaluate=true&loo...

Whoa, thanks for introducing me to Babel. It looks like user plugins could be wildly, astonishingly powerful for doing compile-time code execution.

Correct. One of my favourite at the moment is `babel-plugin-rewire`, which is a neat replacement for `rewire` -- allowing easy unit testing in full isolation by hijacking the `import` statements :)

[0] https://www.npmjs.com/package/babel-plugin-rewire

[1] https://www.npmjs.com/package/rewire

Re: ECMAScript 2015 Approved

#90

Earlier quoted context omitted.

You could write that code to be a little more human readable. That appears to be complicated for the sake of being complicated. Elegance doesn't have to be complexity, or trying to write as few lines as possible. http://photos3.meetupstatic.com/photos/event/4/b/c/2/600_436...

Looks like idiomatic JS code to me.

http://tritarget.org/blog/2012/11/28/the-pyramid-of-doom-a-j...
Post reply on HN