Re: Weird Java Interop Behaviour

2009-11-21 Thread John Harrop
On Sat, Nov 21, 2009 at 8:47 PM, David Brown wrote: > On Fri, Nov 20, 2009 at 03:54:45PM -0800, Mike Hinchey wrote: > >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)

Re: Weird Java Interop Behaviour

2009-11-21 Thread David Brown
On Fri, Nov 20, 2009 at 03:54:45PM -0800, Mike Hinchey wrote: >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

Re: Weird Java Interop Behaviour

2009-11-20 Thread Alex Osborne
Matt Brown wrote: > Why does (. System getProperty "java.version") work when > (. (identity System) getProperty "java.version") does not work, given > that > (identity System) should be the same as System ? It's because the . special form treats class names specially. In Java there's unfortunat

Re: Weird Java Interop Behaviour

2009-11-20 Thread Mike Hinchey
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 ge

Weird Java Interop Behaviour

2009-11-20 Thread Matt Brown
Hi. I can't find the answer to this anywhere. (It seems it should be posted somewhere already ...) This works: (. System getProperty "java.version") -> "1.6.0_15" This does not work: (. (identity System) getProperty "java.version") -> java.lang.IllegalArgumentException: No matching method fo