Fmjrlhm2nexd5j1my0zw
SkillsCast

The Miracle of Generators

28th October 2015 in London at CodeNode

This SkillsCast was filmed at The Miracle of Generators

SkillsCast coming soon.

At FunctionalJS we practise (bring a laptop) and hear about functional programming with JavaScript. At each meetup we run a dojo. No experience with FP needed, we're all here to learn! Bring a laptop.

The ECMAScript 2015 specification introduced iterators, which generalise iteration over common data structures, as well as providing an interface for allowing you to iterate over any custom data structures using common language constructs. ES2015 also introduced generator functions, which make writing arbitrary iterators a lot easier and less boilerplatey.

But generators aren’t just for making simple iterators over data structures. Because they’re bidirectional—they don’t only produce output, they can also take input—they’re actually coroutines, which means there’s no end to the sort of fun you can apply them to. We’re going to explore how we can use them to make asynchronous programming in JavaScript a lot more elegant—to chart a path out of callback hell. And then we’re going to take a look at what we’ve really discovered: one of the most fearsome mysteries of computer science, suddenly laid bare before us.

YOU MAY ALSO LIKE:

Thanks to our sponsors

The Miracle of Generators

Bodil Stokke

Bodil works as a computer science researcher for a secretive think tank, and is a world renowned expert in varied fields such as pizza and persistent data structures. Contrary to popular rumour, she only has five fingers on each hand, but is still an Emacs user.

SkillsCast

SkillsCast coming soon.

At FunctionalJS we practise (bring a laptop) and hear about functional programming with JavaScript. At each meetup we run a dojo. No experience with FP needed, we're all here to learn! Bring a laptop.

The ECMAScript 2015 specification introduced iterators, which generalise iteration over common data structures, as well as providing an interface for allowing you to iterate over any custom data structures using common language constructs. ES2015 also introduced generator functions, which make writing arbitrary iterators a lot easier and less boilerplatey.

But generators aren’t just for making simple iterators over data structures. Because they’re bidirectional—they don’t only produce output, they can also take input—they’re actually coroutines, which means there’s no end to the sort of fun you can apply them to. We’re going to explore how we can use them to make asynchronous programming in JavaScript a lot more elegant—to chart a path out of callback hell. And then we’re going to take a look at what we’ve really discovered: one of the most fearsome mysteries of computer science, suddenly laid bare before us.

YOU MAY ALSO LIKE:

Thanks to our sponsors

About the Speaker

The Miracle of Generators

Bodil Stokke

Bodil works as a computer science researcher for a secretive think tank, and is a world renowned expert in varied fields such as pizza and persistent data structures. Contrary to popular rumour, she only has five fingers on each hand, but is still an Emacs user.