Harmony specifications and their usage will be useful. Here's a plain & simple explanation of them for your easy understanding.
Over the years, Ecma has released different editions of ECMAScript standard. For the ease of use we call these standards as "ESx", where
x refers to the edition. So the 3rd edition of ECMAScript is known as
ES3 can be considered as the most widely adopted edition of ECMASCript.
The most outdated browser in mainstream (aka Disease) Internet Explorer 6 is compliant with
ES3. Sadly, other common IE versions(7 & 8) are also only compatible with
ES3. Early versions of most other browsers also supported
Source-to-source compilers such as CoffeeScript, which aims to run everywhere, compiles its code to be compatible with
If you are interested in reading the full ECMAScript 3rd edition specification, you can download it from here.
After years of split and conflict of interests ECMA's Technical Committee came to an agreement in 2008 to follow two paths for the future development of ECMAScript. One as an immediate plan to overcome the issues
ES3 specification (then called as ES3.1). Another with a long term vision to evolve the language for the modern requirements. They also decided to kill ES4 specification, which was under development to support the above plans.
ES3.1 edition was finally released as
ES5 in 2009. Some of the notable features in this edition were Native JSON support, better Object creation and controlling options, utility Array functions and the introduction of strict mode to discourage the usage of unsafe and poorly implemented language features. You can read a detailed introduction about
ES5 features in Opera blog.
Full support for
ES5 in major browsers were introduced from the following versions - Firefox 4, Chrome 7, Internet Explorer 9 and Opera 11.60. Safari 5.1 (and mobile Safari) in iOS5 do support all of
ES5 features except for
Function.bind. Also, IE9 doesn't support the
strict mode option. Juriy Zaytsev provides a comprehensive compatibility table of
ES5 features, which I recommend you to bookmark.
So is it safe to use
ES5 features will break for them. One way to solve this problem is to use ES5 shims for unsupported browsers. You may decide which shims to include depending on the features you use in your code. Also, if your code is already depending on a utility library such as Underscore.js, which also provides similar features to
ES5 you may continue to use it. Most utility libraries will use the native implementation if available, before falling back to its own implementation.
ES5 features. As I mentioned earlier CoffeeScript compiles only to
ES5 features such as
bind. However, this is still an open issue with discussions, suggesting CoffeeScript may add the option to compile
ES5 compatible code in future.
For the full reference of
ES5, I recommend using the annotated HTML version done by Michael Smith - es5.github.com
The long-term plan for the ECMAScript in 2008 meeting, was code-named
Harmony. Committee is still accepting proposals for this edition. Most probably, this will become the
ES6, but given the past track-record of ECMA-262
ES.Next would be more suitable name until a release is made.
Currently planned features for
Harmony sounds promising. Brendan Eich has shared some ideas for Harmony which seems to make the language more concise and poweful. Also, his presentation on Proxy Objects in Harmony sounds awesome.