Blog of Raivo Laanemets

Stories about web development, freelancing and personal computers.

ECMAScript 6


ECMAScript 6 specification has been approved by ECMA International. The spec brings lots of new features into the JavaScript language. Hopefully it will be adopted fast by JavaScript engines.

Some new features:

  • classes
  • destructuring
  • arrow functions (lexical this)
  • generators
  • tail calls
  • block-scoped let
  • const
  • Promise built-in
  • Symbol built-in
  • Map and Set built-ins
  • Proxy built-in
  • etc...

The spec can be read online here. The current compatibility list can be found from here. ES6 code can be transpiled for current runtimes by using the Babel compiler. Many ES6 features have been covered in-depth in the ‚Ď°ality blog.

Out of the new features I really like Promises. Large part of my JavaScript code runs on server-side, with Node.js, and interacts with databases and other external sources of data. This means high number of async operations. Promises make it easy to compose async operations. They are shimmable to old runtimes and I have been using them for 2 years already. It's good to see that they are now part of the language specification. While other updates are nice too, they are unlikely to bring as much productivity boost as Promises.


Comments

No comments have been added so far.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.