Meikel Brandmeyer <m...@kotka.de> writes:

Hi Meikel,

>> Oh, yes.  That was the exact issue.  But clearly forcing realization
>> is not a good solution.  Is there some better way to do what I want?
>> Maybe my macro should expand to something like that?
>> 
>>  ((fn [] (binding [...as before...] body)))
>
> Shameless self-promotion:
> http://kotka.de/blog/2009/11/Taming_the_Bound_Seq.html
>
> It's not perfect, but maybe it helps.

It's a great read to truly understand what's going on.  So thanks a lot
for that pointer.  However, in my case, I think there's a much better
solution, which your citation of Rich "running into a lot of such
trouble is a sign, that you misuse dynamic variables." pointed me to.

Why do I use a dynamic var in the first place?  I want to use the simple
names in the lexical scope of the `with-schema-imports' block, and I
used a dynamic var only because the resolution takes place somewhere in
the function call tree originating from there.  So a much cleaner
solution is to walk the body given to my macro and replace the simple
names with qualified names, so that at runtime everything is fully
qualified.

Bye,
Tassilo

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