On Fri, Feb 11, 2011 at 10:59 AM, CuppoJava <patrickli_2...@hotmail.com> wrote:
> I realized, actually, after your post Ken, that my implementation of
> macroexpand-all does not do exactly what I want.
>
> The properties of macroexpand-all, should be:
>
> (eval some-expression) is *always* equal to (eval (macroexpand-all
> some-expression))
>
> This is not the case in my current implementation because, as you
> said, names can be shadowed by local bindings. I'll have to write a
> more involved version...
>
> Your macroexpand-all has the same problem but you're probably not
> using it the same way I am.

No, I was just using it on fairly simple forms in uncluttered
namespaces to check what fundamental primitives everything boiled down
to. You'd need most of the code of my macrolet to avoid this -- the
bulk of it is in fact concerned with keeping track of local bindings
and replicating the shadowing behavior that would occur without it.

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