Several JavaScript/ECMAScript "Harmony" features are now supported

Feb 11, 2012 12:51 GMT  ·  By

Google Chrome 19 has landed in the dev channel and is ready for testing. It already brings several new features and it's got six more weeks in the dev channel to get more. But apart form the new features, Chrome 19 also adds support for some advanced JavaScript concepts part of the Harmony project, which is slated to become the next major version of the scripting language.

"The ECMA committee is working hard on designing the next version of JavaScript, also known as 'Harmony.' It is due by the end of next year and it is going to be the most comprehensive upgrade in the history of this language," Andreas Rossberg and Michael Starzinger, software engineers at Google, wrote.

"Chrome and V8 are committed to pushing JavaScript forward and have already started implementing the new features. You can try some of them today in the latest dev channel release," they added.

Harmony is the codename for the next JavaScript, or rather ECMAScript the more accurate name, version beyond JavaScript/ECMAScript 5.1. It slated to become standard, but there is more work to be done. Still, when ready, it will be one of the biggest updates to the language in its history.

The latest Chrome 19 comes with several features to be included in JavaScript Harmony such as "lexical scoping," "collections," "weak maps" and "proxies." There are more details in the post and more such features are coming V8, Chrome's JavaScript engine.

The features are experimental and are not enabled by default, you have to visit the Chrome flags section, chrome://flags or about:flags, and activate "Experimental JavaScript features."

At the same time, Google is also working on a JavaScript replacement/competitor, though it won't necessarily call it that, Dart. The language is still in the works, but Chrome support is guaranteed when it matures enough.