[Python-Dev] 'stackless' python?

Tim Peters tim_one at email.msn.com
Sat May 15 09:51:00 CEST 1999


[GvR]
> ...
> Anything that assumes knowledge about how the C compiler and/or the
> CPU and OS lay out the stack is a no-no, because it means that the
> first thing one has to do for a port to a new architecture is figure
> out how the stack is laid out.  Another thread in this list is porting
> Python to microplatforms like PalmOS.  Typically the scheme Hackers
> are not afraid to delve deep into the machine, but I refuse to do that
> -- I think it's too risky.

The Icon language needs a bit of platform-specific context-switching
assembly code to support its full coroutine features, although its
bread-and-butter generators ("semi coroutines") don't need anything special.

The result is that Icon ports sometimes limp for a year before they support
full coroutines, waiting for someone wizardly enough to write the necessary
code.  This can, in fact, be quite difficult; e.g., on machines with HW
register windows (where "the stack" can be a complicated beast half buried
in hidden machine state, sometimes needing kernel privilege to uncover).

Not attractive.  Generators are, though <wink>.

threads-too-ly y'rs  - tim






More information about the Python-Dev mailing list