emacs-devel
[Top][All Lists]
Advanced

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

Re: Guile in Emacs


From: David Kastrup
Subject: Re: Guile in Emacs
Date: Wed, 10 Mar 2010 14:58:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Ken Raeburn <address@hidden> writes:

> On Mar 9, 2010, at 11:22, Ted Zlatanov wrote:
>> Make sure you check out the emacs-mt work too at
>> http://gitorious.org/emacs-mt as that's (AFAIK) the closest to getting
>> into Emacs.  Giuseppe Scrivano has done great work.
>
> Ah, yes, I thought I might be forgetting someone.  (Sorry!)
> So many to keep track of... that's a *good* thing! :-)
>
>> Have you considered continuations support?  I didn't see mention of them
>> in the docs.
>
> Not even remotely, no. :-) I'm not particularly familiar with
> continuations in Scheme, let alone how you'd map that into elisp, or
> if the Lisp world has a similar construct....

Basically the idea (Chicken even implements it like that) is that you
never clean up your return stack, but treat it like a garbage-collected
heap.

Procedures are called implicitly with a pointer to the return stack.
When a procedure returns, it basically "calls" this pointer.  Now
call/cc does the same, but passes this pointer also _explicitly_ to the
procedure in question, which may store it someplace.  If at some later
point of time somebody calls this from wherever it may have been stored,
Scheme in effect returns "again" (if it did previously return) or for
the first time, abandoning the control flow it happened to be in at that
time (unless you stored its continuation somewhere else, of course).

-- 
David Kastrup





reply via email to

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