The fundamental concept of continuations

George Neuner gneuner2/ at /comcast.net
Mon Oct 15 00:17:40 EDT 2007


On Mon, 15 Oct 2007 11:56:39 +1300, Lawrence D'Oliveiro
<ldo at geek-central.gen.new_zealand> wrote:

>In message <see-36543E.18592809102007 at lust.ihug.co.nz>, Barb Knox wrote:
>
>> Instead of function A returning to its caller, the
>> caller provides an additional argument (the "continuation") which is a
>> function B to be called by A with A's result(s).
>
>That's just a callback. I've been doing that in C code (and other
>similar-level languages) for years.

Callbacks are a form of continuation.  However, general continuations
such as those in Scheme, carry with them their execution context.
This allows them to used directly for things like user-space
threading.

George
--
for email reply remove "/" from address



More information about the Python-list mailing list