Stackless python and microthreads

Michael Walter cm at leetspeak.org
Fri May 14 07:25:22 EDT 2004


> My experience with continuations (in Scheme) is limited, but I really
> wonder if continuations have a place in a high level programming language.
> I mean, continuations are basic building blocks: you can build on top
> of them exception systems, generators, coroutines, microthreads, etc,
> and it is an interesting learning experience to understand how this is
> done.
Yeah exactly, they are one reason which allows Scheme to be really 
high-level.

They're pretty useful for web applications, too -- the difference to 
above-mentioned examples would be that IMHO there is no adequate 
alternative to them in current Python.

> However, to pass from continuations to something useful takes a 
> LONG way. Continuations are a too low level concept.
That probably depends on the point of view. I don't think it matters 
much whether a specific feature is built-in into the language as such or 
part of the/a standard library.

 > A high level language should already provide the right high level 
tools. I mean,
 > the language designer should implement generators, exception systems, 
microthreads, etc.
> not the application programmer. When you have the high level concepts written 
> down by others, you don't need continuations.
Would you have an idea on how a higher-level replacement for 
continuations in web application development? I'm excited (and _not_ 
being any sarcastic or stuff, honestely!).

> Speaking in general, generators and the current exception system are more 
> than enough for my typical needs in Python: which kind of applications do 
> you have in mind where you would like to have continuations? (a part from
> microthreads and things like changing the language introducing new
> control structures, etc, all stuff than should not be left to the
> application programmer, IMHO).
Web application development involving Continuations (such as in Seaside, 
the PST web server etc.).

Cheers,
Michael



More information about the Python-list mailing list