Christian Tismer 2000:
. this paper presents an implementationwhy should stackless be popular?
of "Stackless Python" (a Python which
does not keep state on the C stack) .
By decoupling the frame stack from the C stack,
we now have the ability to keep references to frames
and to do non-local jumps.
This turns the frame stack into a tree,
and every leaf of the tree can now be a jump target.
While exploring this idea,
we will recognize ordinary function calls and returns
to be just special cases of so-called continuations, ... .
. the maximum recursion level would be a user optionwhere is stackless now?:
and not a limit set by C's stack .
There would be pickleable execution states;
that means you can save your running program
and send it in a file to another computer
where it can continue running .
Tismer, the author of stackless,why isn't stackless popular?:
is now deeply involved with PyPy
-- " the way of the future".
He has implemented Stackless in PyPy
and considers it superior to Stackless itself .
. it's not clear to me why it has to be
defined in terms of continuations;
concurrency and pickling are really simple concepts,
and while continuations may be
an exciting academic challenge,
they are hardly essential to stacklessness,
and they really worsen the design problem's complexity .
20: adda/cstr/goto gone wild (related to continuations):
Tismer 2000:
"By decoupling the frame stack from the C stack,-- when I read that, I had this idea about
we now have the ability to keep references to frames
and to do non-local jumps.
This turns the frame stack into a tree,
and every leaf of the tree can now be a jump target. "
being able to call a control subprogram
that would decide where the next goto would be to;
eg, the typical function after finishing
passes control to where the caller made the call,
but a ( goto subprogram() ) call
could also go to any other place
in any currently active act'rec .
No comments:
Post a Comment