ECMAScript:Harmony / ES6 to JavaScript compiler ECMAScript:Harmony / ES6 to JavaScript compiler javascript javascript

ECMAScript:Harmony / ES6 to JavaScript compiler


(shameless but relevant plug below)

Caja is reworking its ES5 support via ES5/3 and will do the same for ES harmony. So our structure would be implemented as a Harmony to ES3 layer which can be skipped for real harmony implementations, and then a separable loader that preserves the security properties that concern caja.

Like Traceur, members of the Caja team are part of TC39 (the committee defining ES Harmony).

I don't know about Coffeescript's plans, but it was mentioned during discussions of Harmony modules. Module loaders will likely have the ability to intercept loaded source code (via eval hooks) and rewrite it before module initialization, so if a module is written in CoffeeScript, a runtime CoffeeScript rewriter could be invoked at initialization time. This would allow apps to be composed of modules written in multiple languages that compile down to Harmony at load time.

One thing to note is that not everything in Harmony can be implemented easily via translation. For example, implementing weak maps correctly would require implementing your own garbage collector in JavaScript and even if you did that you would probably just reintroduce the host object/native object cycle problem.


Continuum has implemented most of the relevant features and should run in es3 browsers (like older IEs).