emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs Lisp and Guile


From: Richard Stallman
Subject: Re: Emacs Lisp and Guile
Date: Tue, 13 Aug 2002 16:47:06 -0600 (MDT)

Having now seen the R5RS description of dynamic-wind, I see it is a
very low-level mechanism.  For the sake of using dynamic-wind for
dynamic variable bindings, it would be convenient to have a function
to swap in bindings and a function to swap out bindings.  Then
when you write calls to dynamic-wind, you would call these functions,
not manipulate bindings directly.

These functions could also have code for correct interaction with
buffer-local bindings and frame-local bindings.  No special
primitive features would be needed for those, if they are implemented
in an unoptimized fashion and always swap the values in and out
immediately.

The hardest part of the mechanism that Emacs uses now to implement in
Guile is the optimization of not finding and swapping in a variable's
current binding until a reference occurs.  If Guile provided a
mechanism to run arbitrary code for a variable reference, we could use
that mechanism to implement this optimization.

Suppose that Guile could run arbitrary code before and after the
variable reference, for effect only, and the variable reference itself
would always occur normally.  This would not encourage people to use
variables for jobs that ought to be done by functions, but would
permit implementation of this optimization, and various sorts of
forwarding.  What do you think of this idea?






reply via email to

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