[Python-Dev] 'stackless' python?

rushing at nightmare.com rushing at nightmare.com
Thu May 13 08:34:19 CEST 1999


[list has been quiet, thought I'd liven things up a bit. 8^)]

I'm not sure if this has been brought up before in other forums, but
has there been discussion of separating the Python and C invocation
stacks, (i.e., removing recursive calls to the intepreter) to
facilitate coroutines or first-class continuations?

One of the biggest barriers to getting others to use asyncore/medusa
is the need to program in continuation-passing-style (callbacks,
callbacks to callbacks, state machines, etc...).  Usually there has to
be an overriding requirement for speed/scalability before someone will
even look into it.  And even when you do 'get' it, there are limits to
how inside-out your thinking can go. 8^)

If Python had coroutines/continuations, it would be possible to hide
asyncore-style select()/poll() machinery 'behind the scenes'.  I
believe that Concurrent ML does exactly this...

Other advantages might be restartable exceptions, different threading
models, etc...

-Sam
rushing at nightmare.com
rushing at eGroups.net





More information about the Python-Dev mailing list