[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
#,
"The intention is that #, can only be used in constants, not in forms."
This seems unnecessarily restrictive. #, should act like a load-time
constant. It can be used wherever a form would normally be evaluated.
The form has to be evaluated at top-level.
(DEFUN FOO (X)
`(,X #,(PRINT "This prints at load time.") NON-EVALUATED))
(DEFUN BAR (X)
(LIST X #,(PRINT "This too.") 'EVALUATED))
When loading these functions, it prints the messages, and then
(FOO 3) ==> (3 "This prints at load time." NON-EVALUATED)
(BAR 3) ==> (3 "This too." EVALUATED)
The loader evaluates the form and stuffs the value as a constant in
the compiled function object.
---Walter
-------