On Mon, Oct 31, 2011 at 8:12 AM, Matt Joiner firstname.lastname@example.org wrote:
+10 for greenlet style coroutines. It's a very modern feature and will put python in an excellent position. Also nick your points about asynchronous io being the main use case are spot on as far as I'm concerned.
This whole thread has been very helpful to me in understanding not only why I think Greg's coroutine PEP is important, but also why the whole generators-as-coroutines paradigm feels so restrictive.
It means we basically have two potential paths forward:
1. Stackless Python (aka greenlets). Pros: known to work for a large number of use cases Cons: need to define a mechanism to declare that the C stack is being used in a "coroutine friendly" fashion
2. Implicit creation of generator-style suspendable frames Pros: shouldn't need assembly level hackery Cons: effectively requires duplication of every C level type slot with a coroutine friendly equivalent that supports suspension