http://qs321.pair.com?node_id=390586


in reply to Re: (Semi-OT) Coroutine vs Continuation?
in thread (Semi-OT) Coroutine vs Continuation?

Both coroutine and generator are proper terminology. (They describe mostly the same thing, so I think generator was coined by someone unfamiliar with corotines) Generators are usually used only for simple things (iterators and such) and are normally very straightforward, and as such normally don't have a fully general coroutine implementation. Coroutines can be significantly more complex -- with proper back-end transformation you can implement a full pthreads-style threading system with coroutines, something you'd probably not want to do with generators.