(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.
-Phil
-Phil
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
Fascinating; thanks.
It's a shame that forms with implicit "do" don't get treated
similarly, but I suppose that's a sidetrack for which it would be very
difficult to get all the edge cases for very little gain.
(eval '(when true (require 'clojure.inspector) clojure.inspector/inspect))
Exception in thread "main" java.lang.ClassNotFoundException:
clojure.inspector (core.clj:6)
-Phil
-Phil