我有:
(defmacro assign (name value)
(format t "assigning ~A to ~A~%" `,name `,value))
(defun opcode-call (&rest args)
(mapcar (lambda (arg)
(if (stringp arg)
(let ((var (gensym)))
(assign var arg)
var)
arg))
args))
当我编译操作码调用时,REPL 输出:
assigning VAR to ARG
OPCODE-CALL
为什么在编译时评估分配?