Zach Tellman writes:

 > I see.  This is honestly something I hadn't considered, but since
 > Riddley actually uses the Clojure compiler internals to track
 > locals, this would be as simple as a (when-not (contains?
 > (riddley.compiler/locals) (first expr)) ...) guard in the
 > macroexpansion.

If you don't need complete recursive expansion, that's indeed an
approach worth exploring. For tools.macros that's not an option
because the compiler knows nothing about local macros and symbol
macros.

 > As Ben points out, using the compiler this way is the only way to
 > make sure that locals are consistent everywhere, rather than just
 > in your own targeted use to track shadowing.

Well, either you use the compiler or you replicate what it does.  For
tools.macro I had to choose the second approach. I don't claim it has
no bugs, I just claim I haven't had any bug reports ;-) (until today
at least).

Konrad

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