Mikera <mike.r.anderson...@gmail.com> writes:

> On Wednesday, 11 December 2013 14:50:36 UTC, Phillip Lord wrote:
> Macros that generate type hints can get pretty ugly. 

Yes, I notice that!

> I ran into the same problem with vectorz-clj
>
> The following pattern ended up working for me: the trick to to create a 
> local symbol that you can tag
>
> (defmacro tag-symbol [tag form]
>   (let [tagged-sym (vary-meta (gensym "res") assoc :tag tag)]
>     `(let [~tagged-sym ~form] ~tagged-sym)))


Will try, thanks for the pointer!

Phil

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to