>>>"MS" == Michael Sperber schrieb am 26 Aug 1998
09:53:12 +0200:
MS> Another problem with this approach is that it breaks in the
MS> following case:
MS> (setq bar 23)
MS> (defmacro foo () bar)
MS> (defun baz () (foo))
MS> (baz) => 23
MS (setq bar 42)
MS> (baz) => [still ...] 23
MS> This makes obvious that the macro dereferences the binding too
MS> early. (Namely, at expansion time.)
Time seems to getting near to issue a bug-report to Bruno Haible[1]
... (again the following is from ACL4.3):
USER(8): (setq bar 23)
23
USER(9): (defmacro foo () bar)
FOO
USER(10): (defun baz () (foo))
BAZ
USER(11): (baz)
23
USER(12): (setq bar 42)
42
USER(13): (baz)
42
No surprise here: (foo) => 42 !
USER(20): (setq bar 23)
23
USER(21): (let ((bar 42)) (baz))
23
USER(22): (setq bar 57)
57
USER(23): (let ((bar 42)) (baz))
57
USER(24): (foo)
57
Footnotes:
[1] .. but of course, we would have to check the HyperSpec at least
to see if ACLs behaviour is correct (required by the ANSI definition
that is).
Holger
PS: I begin to see the problems that you have with CL-macros. That
won't make me switch to Scheme, however. I have lived up to avoid
these problems.
--
---
http://www.coling.uni-freiburg.de/~schauer ---
">grep schauer passwd
schauer:x:1075:1075:Holger Schauer,
2790:/home/schauer:/usr/bin/xemacs"
"Das ist nur eine Shell. Bedenklich
waere, wenn Dein LILO /vmunix.el bootet."
-- Kristian und Holger in de.comp.os.linux.misc