3 ms·
Exactly right. Part two will be about generators like this, as well as coroutines and fibers. Simple generators don't really let you flip internal and external
by munificent 14y ago
Exactly right. Part two will be about generators like this, as well as coroutines and fibers. Simple generators don't really let you flip internal and external iteration, they just give you a nice way to reify a single stack frame. Coroutines and fibers are even more awesome because they let you reify an entire callstack.
- btilly 14y agoOf course the downside of that kind of power is that it makes it very hard to reason about what code will do sometimes. As I once heard about continuations, it is a like a goroutine, only worse.