It's the . special form that makes the difference.  In (. System
(getProperty)), the dot interprets System as a class and looks for a static
method (at read/compile time).  With (identity System), System resolves to a
value, a Class object, returned by identity, then your outside dot looks for
a getProperty instance method on that object(fallback to reflection, which
fails) - it's like writing System.class.getProperty in java.  There is no
syntax for clojure to lookup a static method on a dynamically resolved class
object because that is inherently reflection - dot is not about reflection,
though it will do it as a last resort.

Hope that helps.

-Mike

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