[Ecls-list] symbol-macro usage
Tobias C. Rittweiler
tcr at freebits.de
Sat Feb 13 16:06:15 UTC 2010
Juan Jose Garcia-Ripoll writes:
> This implies sequential EXECUTION of toplevel forms. It does not imply that
> the constants referenced in the toplevel forms have to be created
> sequentially. There is a difference between the forms that are executed and
> the content of those forms. The predigested forms do contain all constants
> and objects which are needed. In particular, symbols. The previous paragraph
> only imposes that the forms are executed sequentally, not WHEN the objects
> that constitute those forms are created.
>
> What you are asking is something similar to changing the readtable between
> two forms which are sequentially read from a source file. This can be done
> in a source file but not in a compiled file. Or would you expect it to
> behave the same?
EVAL-WHEN and externalization always make my head spin. I bang my head
around the relevant sections from time to time, and think I reach
understanding, only to find myself a month later having forgot most of
what I thought I knew, and banging my head against them again.
I found it hard to follow what you were saying for it only consisted of
words, and translating words to actual code is difficult. (It also does
not help that my concentration is low due to sickness.)
Regarding above paragraph, I very much do expect
;; Toplevel form #1
(eval-when (:compile-toplevel :load-toplevel :execute)
(setq *readtable* (make-my-custom-readtable)))
;; Toplevel form#2
(frob #@foo) ; #@ defined in custom readtable
to work. In fact, if that didn't work as expected, how would IN-PACKAGE
forms affect the reader?
Perhaps you weren't talking of EVAL-WHEN at all, just two forms?
Could you provide some pseudo-code illustrating your earlier remarks?
-T.
More information about the ecl-devel
mailing list