[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Lisp and Guile
From: |
Stefan Monnier |
Subject: |
Re: Emacs Lisp and Guile |
Date: |
Fri, 09 Aug 2002 02:50:52 -0400 |
> Right now, a variable is a strictly passive data container. You can't
> intercept accesses to it. A variable reference is a direct reference
> to memory, not a function call. We would have to change this model to
> also allow 'active' variables that can run arbitrary code when they
> are accessed.
>
> That is not what I am suggesting. Variables in Emacs do not run
> arbitrary code when accessed; I think that would be a misguided
> feature.
In Scheme we can use fluid-let to implement Elisp-style dynamic binding.
The only difference with Elisp is that you use `fluid-let' instead
of `let' when binding a variable dynamically.
I think we should aim to move in the direction where most let-bound
variables are lexically scoped and the rest (i.e. `defvar'd variables)
is accessed/modified via special functions/macros.
In most cases (in Elisp practice) lexical or dynamic scoping of let-bound
(and not defvar'd) variables has exactly the same semantics. Miles'
`lexbind' branch is trying to do just that as is someone on the XEmacs
side (the means are different, tho).
If we can get high enough compatibility (maybe full compatibility is
even possible), that would mean that running "arbitrary code" when
accessing a dynamic variable is at least not a performance problem
(and it can be very convenient when debugging). It could also be
useful for meta-variables (such that setting them modifies all
those that depend on it: it currently can be done in very limited
ways via the :set parameter to defcustom).
Stefan
- Re: Emacs Lisp and Guile, (continued)
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/08
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/09
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/12
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/12
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/13
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/14
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/14
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/15
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/19
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/20
- Re: Emacs Lisp and Guile,
Stefan Monnier <=
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/10
Re: Emacs Lisp and Guile, Michael Sperber [Mr. Preprocessor], 2002/08/10
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/10
- Re: Emacs Lisp and Guile, Michael Sperber [Mr. Preprocessor], 2002/08/11
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/12
- Re: Emacs Lisp and Guile, Michael Sperber [Mr. Preprocessor], 2002/08/13
- Message not available
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/13
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/14
- Re: Emacs Lisp and Guile, Richard Stallman, 2002/08/15
- Re: Emacs Lisp and Guile, Marius Vollmer, 2002/08/19