Generators: A Hummer in the Stable?
summary
Explains ES2015 generators and iterators: what iterators and generators are, how for/of works, and the hidden classes the standard requires. Shows advanced uses — extending iterator behavior for higher-order programming, using generators as coroutines to manage stateful problems — and covers async iteration in ES2018 (async generators and for/await/of) plus the relationships among async functions, generators, and async generators.
AI-written summary · about
chapters (6)
- 0:00Generators introduction
- 10:08Traditional implementation problems
- 20:01Efficiency gains with generators
- 30:11Live coding demo
- 40:21Use cases and benefits
- 49:49Conclusions and Q&A
related talks
28mWhat happens next: a choose-your-own-adventure with iterators
51mThe Miracle of Generators
15mI Yield for Generators
24mGenerating async iterators is ekstreamly easy, I Promise ;)
35mJavascript Generators
27mA, B, C. 1, 2, 3. Iterables you and me
38mRecursion, Iteration, and JavaScript A Love Story
31mPromises and Generators: control flow utopia
