stackless python

Paul Rubin phr-n2001d at nightsong.com
Mon Dec 31 10:28:40 EST 2001


Christian Tismer <tismer at tismer.com> writes:
> I'm pretty sure Scheme can. It has raw continuations, so you can
> implement everything with them, why not microthreads?
> Continuations can do even more, they are able to create new
> control structures for your language. And exactly that it the point
> which makes them insuitable for Python: They are too powerful.
> Python has its own control structures, and we don't need a construct
> with the power to build some. This is oversized, and very oversized
> construct turns out to be a drawback at some future.
> What Python needs is a secure mechanism to switch frame changes
> at certain times. This is not continuations, but microthreads with
> explicit or implicit switching.

The thing I don't fully understand is that several Scheme
implementations are both smaller and faster than Python.  I've been
wondering for a while whether it's time to graft a Python parser onto
a Scheme compiler/evaluator.  The limitations of "simple generators"
also seem kind of artificial--maybe Stackless for 2.2 can support
calling a generator from multiple places.



More information about the Python-list mailing list