Stackless 3.0 alpha 1 at blinding speed
staschuk at telusplanet.net
Mon Apr 21 20:36:39 CEST 2003
Quoth Anton Vredegoor:
> "A.M. Kuchling" <amk at amk.ca> wrote:
> Thanks. It seems Tim is making a heroic effort to explain the new in
> terms of the old. This necessarily must fail, but what other option is
> there instead of rebuilding all terminology out of gotos?
I am not sure it needs to fail, nor that it is a bad idea to
"rebuild" everything out of gotos.
One possible method for understanding continuations, for those
with C (or similar language) experience: Assume you have only one
control flow construct, a conditional goto. Show how if/else,
loops, and function call/return can be implemented using
conditional goto. Then show how coroutines, generators, and
backtracking can be implemented using it. Notice especially your
use of constructions which consist of "save state, goto there" and
"goto there, restore state" combined in useful ways, for various
values of "state".
Having thus prepared the conceptual ground, *then* go read
material on continuations.
Steven Taschuk o- @
staschuk at telusplanet.net 7O )
More information about the Python-list