Staś is a Warsaw, Poland-based developer at Mozilla and an avid learner of everything.
He works with hundreds of volunteers around the world to make Firefox available globally—and relevant locally. He is also one of the authors of L20n, a paradigm-shifting localization platform from Mozilla.
Generators and iterators are among the most enigmatic and underused features of ECMAScript 2015. They can be used to create custom iterables and infinite sequences. Lesser known applications include controlling asynchronous operations and handling side effects.
In this talk I'll demonstrate how generators can be successfully used to write elegant and performant code. I'll start by explaining how they work and what they are good for. I'll then show you how to bend the rules of space and time, and how to tame Promises and other abstractions with yield. Finally I'll present a hands-on example of how generators can be used to refactor code which otherwise would be tedious to maintain and reason about.