help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The fundamental concept of continuations


From: David Kastrup
Subject: Re: The fundamental concept of continuations
Date: Fri, 12 Oct 2007 21:17:11 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

George Neuner <gneuner2/@/comcast.net> writes:

> Yes and no.  General continuations, as you describe, are not the
> only form continuations take.  Nor are they the most common form
> used.  The most common continuations are function calls and returns.
> Upward one-shot continuations (exceptions or non-local returns) are
> the next most common form used, even in Scheme.
>
> Upward continuations can be stack implemented.  On many CPU's, using
> the hardware stack (where possible) is faster than using heap
> allocated structures.  For performance, some Scheme compilers go to
> great lengths to identify upward continuations and nested functions
> that can be stack implemented.

There is a Scheme implementation (I keep forgetting the name) which
actually does both: it actually uses the call stack but never returns,
and the garbage collection includes the stack.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]