News for hackers. Stuff that matters.
Re:ESnext – Tomorrow’s JavaScript syntax today by Conlectus on Sunday October 12, 2014 @11:06AM (#8445460)
How is this different than the already well established Traceur compiler? https://github.com/google/traceur-compiler
Re:ESnext – Tomorrow’s JavaScript syntax today by heydenberk on Sunday October 12, 2014 @12:41PM (#8445755)
One reason: Traceur strips comments from the source, with no option to preserve them. You can't use Traceur to generate an intermediate build product that you then run through another compiler (eg. Closure Compiler) that uses comments for source annotation.
Re:ESnext – Tomorrow’s JavaScript syntax today by Touche on Sunday October 12, 2014 @03:27PM (#8446301)
Traceur is more complete. ESNext requires less overhead. For most Traceur features, if you want to run it in a browser, requires a rather large runtime.

ESNext is more modular. You can use just some features which may or may not require a runtime. It just depends. Overall Traceur is "better". But ESNext is nice if you just want feature X and don't want the overhead of having to support everything.

Re:ESnext – Tomorrow’s JavaScript syntax today by johnbender on Sunday October 12, 2014 @11:54AM (#8445609)
IIRC, Traceur compiles to es5 which is not supported in IE 8.

[edit] It's not clear to me that this project compiles to es3, but that was my assumption when reading "JavaScript that will work today".

Re:ESnext – Tomorrow’s JavaScript syntax today by v413 on Sunday October 12, 2014 @12:53PM (#8445790)
Looking at the compiled source, it looks like ES5 and not ES3. They use "use strict" and Object.defineProperties which are ES5 features.

P.S. IE9 doesn't support ES5 strict mode so "use strict" might introduce some subtle bugs for that case.

Re:ESnext – Tomorrow’s JavaScript syntax today by skrebbel on Sunday October 12, 2014 @02:37PM (#8446154)
Could you explain how? I thought "use strict" only added more runtime checking, but does not change the semantics. Wouldn't IE9 just interpret the line as a bogus expression and move on?
Re:ESnext – Tomorrow’s JavaScript syntax today by Zardoz84 on Monday October 13, 2014 @03:58AM (#8447865)
I use "use strict" on JavaScript that runs over IE8/9 and I don't get errors from it.
Re:ESnext – Tomorrow’s JavaScript syntax today by girvo on Monday October 13, 2014 @05:03AM (#8447997)
That's because "use strict" is ignored in IE8/9 (thankfully). You usually won't run into any issues, but if you're relying on strict-mode for certain semantics you can run into some very subtle bugs. The chances of that are super low though, I've only ever done it on purpose :)
Re:ESnext – Tomorrow’s JavaScript syntax today by avidal on Sunday October 12, 2014 @11:10AM (#8445467)
That's what I want to know. There are dozens of es6 transpilers.
Re:ESnext – Tomorrow’s JavaScript syntax today by tekacs on Sunday October 12, 2014 @02:05PM (#8446033)
Yup and the place to look for comparison of them is:

http://kangax.github.io/compat-table/es6/

Though admittedly facts like whether they support source maps (such as Traceur) or preserve comments (not Traceur) are omitted. EJS is impressive though.

Re:ESnext – Tomorrow’s JavaScript syntax today by Flenser on Monday October 13, 2014 @11:43AM (#8449147)
Had to look at the compat-table source to find out that EJS is short for Echo JS

https://github.com/toshok/echo-js

(It's definately this repo: https://github.com/kangax/compat-table/pull/115 )