guile-devel
[Top][All Lists]
Advanced

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

Re: CPS and Guile


From: Andy Wingo
Subject: Re: CPS and Guile
Date: Sun, 19 Feb 2012 22:15:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi,

On Sat 18 Feb 2012 17:42, Noah Lavine <address@hidden> writes:

> Why not make dynlet, dynwind, dynref, dynset, prompt, and abort into
> primitives? Code that cares can still match them, and code that
> doesn't care can ignore them.

In the case of dynlet, there is an efficiency concern: you already have
the fluids and values -- it's the difference between with-fluids and
with-fluids*.

Dynref and dynset would be fine as primitives.

Prompt has some efficiency concerns as well, related to whether the body
is a closure or not, and whether the handler reifies the continuation or
not.  Abort is tree-il out of symmetry, but also because of the tail
facility (efficiency, again).

> Second, the idea of annotating tree-il forms with their continuations.
> I think that could actually be done fairly simply, if we remove the
> contraint that they have to be useful :-). I'm imagining that at first
> continuations would be like source information, in that they are
> passed everywhere but the compiler doesn't use them. You could even
> keep a separate hash table of continuations if you really wanted to,
> but that seems like more effort to me.

I'd rather introduce letcont forms as Kennedy does in "Compiling with
Continuations, Continued".  Why would we do CPS if the continuations
would not be useful? :)

Andy
-- 
http://wingolog.org/



reply via email to

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