On Oct 3, 2008, at 2:00 PM, Stuart Halloway wrote:

> Does this make sense?
>
> user=> (let [x Integer] (.getName x))
> "java.lang.Integer"
> user=> (.getName Integer)
> java.lang.NoSuchFieldException: getName

(.getName Integer) expands to (. Integer getName). "." is a special  
form that treats literal class names as its first argument in a  
special way. You can defeat that special treatment with identity:

        (. (identity Integer) getName)

or the equivalent:

        (.getName (identity Integer))

--Steve


--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to