I think I understand; the unquote operator is not providing a
reference to the underlying object itself, but is rather a procedure
that translates the object into a code representation.
Thank-you for the explanation.
On Sep 19, 6:53 am, Stuart Sierra wrote:
> A macro is a function which returns
A macro is a function which returns a data structure representing code
to be compiled. All literals (String, Integer, symbol, etc.) and
basic data structures (lists, maps, etc.) can be compiled, as can
functions.
Most other non-literal objects *cannot* be compiled.
What you probably want is not
I am playing around with a macro to define accessor functions for a
closed-over atom. Here is a simplified example:
(defmacro hidden-atom []
(let [a (atom :hello)]
`(defn get-value [] (deref ~a
When I evaluate this macro, I get the error: "Can't embed object in
code, maybe print-dup not