h5bp/html5please — Issue #55: ES6 
Author: Raynos
Created: 2012-01-23 19:33:59+00:00
State: open

ECMAScript 6 (Harmony)

- [es6 collections][1]
- [es6 shim][2]

Problem with ES6 is that the of the current features in Firefox/Chrome

- WeakMap, Map, Set (can be shimmed)
- Proxies (no idea, doubt it, might be do-able with really expensive polling assuming your happy with race conditions)
- modules (depending on the API, the API might be shimmable, the declarative will not)
- let / const (not shimmable)
- typeof null === "null" (not shimmable)

Note that because ES6 has so many new syntax solutions the ideal solution to this problem is a coffeescript style transpiler. A few projects are attempting this [Reference SO question][3]

- [traceur][4]
- [Caja][5]
- [ES transpiler][6]

This is a use with caution at the very best since the un-shimmable subset of ES6 is signficantly large then the un-shimmable subset of ES5.

I have not added an item for ES6 as I would like feedback on whether we want use with caution or avoid.

Once a stable transpiler exists I would recommend use with fallback where the fallback is the transpiler (you can sniff the http request on the server for things like "text/javascript;version=6" and send either ES6 or transpiled ES3 to browsers).

[1]: https://github.com/WebReflection/es6-collections
[2]: https://github.com/paulmillr/es6-shim
[3]: http://stackoverflow.com/questions/6506519/ecmascriptharmony-es6-to-javascript-compiler
[4]: http://code.google.com/p/traceur-compiler/
[5]: http://code.google.com/p/google-caja/
[6]: https://github.com/kaisellgren/ES-Transpiler