On Fri, Sep 25, 2009 at 4:49 PM, Constantine Vetoshev
<gepar...@gmail.com> wrote:
>
> Chris Houser has summarized the problem here more succinctly than I
> can: http://paste.lisp.org/display/87734

This is a syntax-quote expansion-timing issue, which is why
Meikel's solutions works.  I think it would work the way you want
for all the actual examples you gave, including the literal
anonymous function.

> While searching for a workaround, I thought maybe I could capture the
> functions I need during expansion of def-with-db-macro, but kept
> getting a useless exception. I ended up reducing that problem to this:
>
> (let [f1 #(inc %)]
>  (defmacro m1 [x]
>    `(~f1 ~x)))
>
> (m1 12)
> => No message.
>  [Thrown class java.lang.ExceptionInInitializerError]

This a separate issue having to do with support for AOT
compilation.  It actually worked fine with an older version of
Clojure, specifically 043093bd670d4981a3136294941831c4cfcb7bae
from Sun Oct 12 14:47:24 2008.

The next commit removed support for that feature: "first step
towards AOT compilation - constants now read from strings in
classfiles instead of hand-off from classloader"

--Chouser

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to