2015-03

ES6 generators in depth

[2015-03-30] esnext, dev, javascript, iteration

Generators, a new feature of ECMAScript 6 [^4], are functions that can be paused and resumed. This helps with many applications: iterators, asynchronous programming, etc. This blog post explains how generators work and gives an overview of their applications.

The following GitHub repository contains the example code: generator-examples

Using the ES6 transpiler Babel on Node.js

[2015-03-15] esnext, dev, javascript

This blog post explains how to use the ES6 transpiler Babel with Node.js. You can download the code shown in this post on GitHub. For further information on ECMAScript 6, consult the ebook “Exploring ES6”.

Warning: The approach explained in this post is convenient for experiments and development. But it uses on-the-fly transpilation, which may be too slow for your production code. Then you can transpile as a build step (as explained in the Babel documentation).

The destructuring algorithm in ECMAScript 6

[2015-03-12] esnext, dev, javascript

This blog post looks at destructuring from a different angle: as a recursive matching algorithm. At the end, I’ll use this new knowledge to explain one especially tricky case of destructuring.

No promises: asynchronous JavaScript with only generators

[2015-03-04] esnext, dev, javascript

Two ECMAScript 6 [^1] features enable an intriguing new style of asynchronous JavaScript code: promises [^2] and generators [^3]. This blog post explains this new style and presents a way of using it without promises.

2015-02

Iterables and iterators in ECMAScript 6

[2015-02-26] esnext, dev, javascript, iteration

ECMAScript 6 introduces a new interface for iteration, Iterable. This blog post explains how it works, which language constructs consume data via it (e.g., the new for-of loop) and which sources provide data via it (e.g., arrays).

A 90 minute overview of ECMAScript 6 (video)

[2015-02-17] esnext, dev, javascript

Vote for your favorite “Exploring ES6” cover!

[2015-02-16] esnext, dev, javascript, exploring es6

Classes in ECMAScript 6 (final semantics)

[2015-02-15] esnext, dev, javascript

Recently, TC39 decided on the final semantics of classes in ECMAScript 6 [^2]. This blog post explains how their final incarnation works. The most significant recent changes were related to how subclassing is handled.

First details of my upcoming book on ES6

[2015-02-10] esnext, dev, javascript

Variables and scoping in ECMAScript 6

[2015-02-07] esnext, dev, javascript

This blog post examines how variables and scoping are handled in ECMAScript 6 [^1].