GOTO w/ Python?

Christian Tismer tismer at tismer.com
Fri Jun 21 12:37:51 CEST 2002


Jerzy Karczmarczuk wrote:
> John Roth comments my observation concerning the relation between gotos
> and continuations:

...

>>Continuations, on the other hand, have been discussed, and may
>>very well wind up in Python some day. See the discussion around
>>a variant called 'stackless.'

Guys, I'm watching you!  :-)

> Yeah, I know it. I follow the Mission Impossible Software Team (Tismer
> et al.) for some time. I am interested in scientific computing, and I 
> believe that generators, coroutines etc. are essential for the simu-
> lation. So, the idea to use continuations was for me always very
> appealing (even if sometimes appalling...). Still, the notion of a
> full continuation, as implicit in the letter of GvR
> http://www.stackless.com/continuations.guido.van.rossum.html,
> the machinery which makes a snapshot of the actual state, and which
> is implemented in Scheme through call/cc, is not necessarily the
> very essence of the concept itself, which is simpler. My turn to send
> you to some references. I suggest the Andrew Appel's book 'Compiling
> with Continuations'.

In fact, Guido isn't correct with copying the full execution
stack. The continuations implementation which I did is completely
different in that sense and tries to copy the minimum necessary
to survive.

Appel's book can really be recommended if you like to learn
a new way of thinking.

Still, I'm not planning to support full continuations again.
The immutability of continuations is a hard requirement,
and I didn't find an application yet where mutable tasklets
didn't suffice.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/







More information about the Python-list mailing list