[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic variable binding
From: |
Ludovic Courtès |
Subject: |
Re: Dynamic variable binding |
Date: |
Fri, 19 Dec 2008 14:03:49 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Hi,
Sebastian Tennant <address@hidden> writes:
> My semantic point is that the first argument to definer (above) is not a
> symbol and it's not a variable (an unbound variable error would be
> thrown if it was), so in the context of the first agument to define
> there is a third data type; 'variable name'.
Beware: the term "variable" can refer to an object as returned by
`make-variable', `module-variable', etc., in Guile parlance (info
"(guile) Variables").
What happens with your `definer' macro is that the first argument of the
macro is a symbol (that is, during the *macro expansion* phase). The
result of `definer' (an sexp) is then itself evaluated, so that symbol
becomes a reference to a variable (during the evaluation phase).
Thanks,
Ludo'.