"Joe (Zhou Xiangtao)" writes:
> that's great, thanks. I current use a function wrap reify, it's
> simple.
>
> (defn make-reify [entity] ...)
>
> (defmacro def-site-entity
> `(let [e# (create-e)]
>(def ~ent (make-reify e#
That's even better. ;-)
Bye,
Tassilo
--
--
You received this me
hi Tassilo,
that's great, thanks. I current use a function wrap reify, it's simple.
(defn make-reify [entity] ...)
(defmacro def-site-entity
`(let [e# (create-e)]
(def ~ent (make-reify e#
Joe
On Wed, Dec 18, 2013 at 8:14 PM, Tassilo Horn wrote:
> Xiangtao Zhou writes:
>
> Hi!
>
> >
as an aside, if you're writing def-like macros, I'd encourage you to
look at 'clojure.tools.macro/name-with-attributes'
Jim
On 18/12/13 12:14, Tassilo Horn wrote:
Xiangtao Zhou writes:
Hi!
I want to use reify in macro, but the namespace is the problem. the
following code shows what have d
Xiangtao Zhou writes:
Hi!
> I want to use reify in macro, but the namespace is the problem. the
> following code shows what have done. is there a way to make it right?
Probably this will work:
(defmacro def-site-entity
[ent & body]
`(let [e# (create-e)]
(def ~ent (reify ~'clojure.lang
hi all,
I want to use reify in macro, but the namespace is the problem. the
following code shows what have done. is there a way to make it right?
(defmacro def-site-entity
[ent & body]
`(let [e# (create-e)]
(def ~ent (reify clojure.lang.ILookup
(valAt [key not-found]
hi all,
I want to use reify in macro, but the namespace is the problem. the
following code shows what have done. is there a way to make it right?
(defmacro def-site-entity
[ent & body]
`(let [e# (create-e)]
(def ~ent (reify clojure.lang.ILookup
(valAt [key not-found]