* 2008-03-05 :
- マクロ展開が起こるのは評価時 or コンパイル時という理解でした。
- xyzzy の動作はまさしくこれですよね。
- sbcl はインタプリタがないので定義と同時にコンパイルされて、納得の結果。
- ecl はよく知らない。
- clisp の結果は自分にとってはちょっと不思議。
- 気になったので CLtL2 を確認してみたら、8章の最初のページにありました。
More generally, an implementation of Common Lisp has great latitude in deciding exactly when to expand macro calls within a program. For example, it is acceptable for the defun special form to expand all macro calls within its body at the time the defun form is executed and record the fully expanded body as the body of the function being defined.で、例えば defun での関数定義時にマクロを展開することもOKと書いてありました。
update : 2008-03-05 (Wed) 00:27:35