[Top][All Lists]

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

Use of continuations in eval traps

From: Neil Jerram
Subject: Use of continuations in eval traps
Date: Fri, 28 Oct 2005 19:56:54 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Hi Mikael,

I'm writing directly to you (CC guile-devel) because I believe you
originally implemented the low level traps in eval.c - please correct
me if that's wrong.

I'm thinking about how to implement the ability to skip over the
evaluation of an expression, and providing an easy interface for use
in my Emacs front end, and wondering whether the existing
continuation-based approach is really needed.  The problem with the
continuation approach (in other words, whenever the 'cheaptraps option
is off) is that a continuation is set up before every trap call even
though it won't be needed in most cases, and it seems to me that one
could get similar function by passing the expression to evaluate into
the trap handler and allowing the trap handler to modify it (either by
side effect or by return, to be determined).

If I'm right, it also follows that we could remove the 'cheaptraps
option and use debug-objects unconditionally for these trap calls.
Note that the trap handler remains free to save off its continuation
itself, if that is useful.

What do you think?


reply via email to

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