Join the DZone community and get the full member experience.Join For Free
Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.
To take a look even more into the future, we should target ECMAScript Harmony (no version number for now), which will be the next specification. Its development is in flux, but many features are so interesting that trying them out is worth the hassle.
All you have to do to use Traceur is to write your code into a <script type="text/traceur"> tag, and to include another <script> for the compiler hosted on a public server.
Performance is not great with JIT compilation, so be careful before writing real code with this tool.
Let's dive into the features that ECMAScript Harmony will offer (if they are confirmed in the final version of the specification) and that Traceur lets you try out today.
I've taken some of the examples from Traceur's wiki and shortened them as much as possible for your convenience, then collapse them in a single file so that you can run it in your browser. Loading this .html file with Firebug or Chrome's console open will suffice to see Traceur and Harmony in action, even when loading from the local filesystem.
There are a few more features to explore, like support for iterators or yet another way to provide parameters to functions (in a variable number); however, I feel these are the ones that will have the most impact.
The ultimate goal of Traceur is to allow people to try out the new features and participate to the specification process, so that when the next ECMAScript comes out it has already been put under scrutiny by a multitude of developers: from iteration comes perfection. Happy hacking with Harmony!
Opinions expressed by DZone contributors are their own.