Daniel Amelang wrote:

>Haha, I can't believe I'm actually standing up for Java. This is ridiculous.
>
>So, what you're saying is that there _are_ objects to represent
>classes (and perform certain operations with the class), but they
>aren't powerful enough to _really_ call class objects. I'm right there
>with you on that one. But plenty of Java guys will jump at the
>statement 'classes aren't objects in Java'. It's a matter of what you
>are willing to call a class object.
>
>It feels a lot like the argument that Ruby doesn't have first order
>functions. Well, we do, but not exactly like you'd expect (see
>discussion today on the list about it). Not analogous, but it's all
>about where the draw the line about what's what.
>
>And our ruby classes have limitations too, which might lead some
>smalltalkers to declare 'Ruby doesn't _really_ have class objects'.
>After all, we can't serialize our classes and send them somewhere else
>for use in instantiating objects (without serious hackery).
>
>So, yea, I'm right there with you after all.
>
>Dan
>
>  
>
OK I'm a ruby nooby and a long time Java developer, and I get where this 
is going (I think) having read why's guide (poignant) and why's 
description of meta-programming (just yesterday) some of this is still 
fresh.

The example of polymorphic dispatch could be done in Java, but only 
just, and as this post suggests, with a load of reflection trickery - 
pass in Class, get all the methods, find method named 'foo', create new 
Method object, invoke and voila.  I've just recently had to do this on a 
real project to get of all things a string representation of a List 
(don't ask).  I'm seriously looking at ruby as an alternative to Java 
because stuff like this is trivial in ruby and requires a hell of a lot 
of work in Java (plus the fact that Java5 is just a massive 
dissapointment to some of us).

I'm also looking at Lisp - gotta work out how those lambda's work - I 
still don't 'get it'.

Kev