2010/9/30 Phil Hagelberg <p...@hagelb.org>

> The following form fails in Clojure 1.0, but was fixed in 1.1:
>
>    (eval '(do (require 'clojure.inspector) clojure.inspector/inspect))
>
> It used to fail because it tried to compile the whole quoted form, but
> it couldn't compile the inspect reference because the require hadn't
> been run yet. I think it's great that it works in 1.1, but I'm boggled
> as to how it works. Does the compiler split apart certain forms like
> do and compile/run each form separately? It seems like it wouldn't be
> possible to make this work without multiple passes, but I'm curious
> how it's done.
>

Yes, "do" is given special treatment, I've meet this part of code a while
back. It basically just is converted into as many eval() as there are exprs
in the do.


>
> -Phil
>
> --
> 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<clojure%2bunsubscr...@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 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