On Mon, Mar 21, 2011 at 4:03 AM, Tassilo Horn <tass...@member.fsf.org> wrote:
> 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.

This gets tricky if there are local names that are the same that
should shadow it, though.

If it's the lexical scope and you're just passing symbols to called
functions, i.e. if you did none of this that lexical scope would be
loaded with things like

(some-fn this that 'localities.Locality the-other)

then why not just wrap in

(let [Locality 'localities.Locality]
  ...)

and maybe make a sugaring macro that expands

(the-macro [localities.Locality foo.Bar baz.Quux ...]
  ...)

into

(let [Locality 'localities.Locality
      Bar 'foo.Bar
      Quux 'baz.Quux
      ...]
  ...)

?

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