This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tie variable


Jim Blandy <jimb@red-bean.com> writes:

> In order to support Emacs Lisp's dynamic bindings in a multi-threaded
> environment, I think we're going to need to introduce the concept of
> variables for which arbitrary code gets run to retrieve and set their
> values.

I don't see why this is required.  Are you thinking that we should try
to coerce Guile into evaluating elisp code verbatim?

I thought we were going to translate the code, and then it should be
possible to translate a variable reference into an arbitrary
expression, e.g. into a byte-code object (similar to a gloc) which
references a fluid.

> To reduce the overhead, we could make the `unbound' value, which the
> interpreter already checks for, one of these objects, whose reference
> and assignment functions signal an `unbound variable' error.
> 
> Does the interpreter check for unbound values in local variables?

No, it does this only the first time the variable is referenced.

Checking for unbound at every local reference would introduce overhead.

> But I believe this is inevitable if we really want to support Emacs
> Lisp.

I believe there exists several alernatives.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]