Raphaël Valyi wrote:

    - What can't you do with Java integration and JRuby today?


No big limit as far as I know. I think if you extend a Java class in Ruby, then that class won't look extended from Java. Only Ruby will see those extensions. Of course changing an object from JRuby also changes it in Java, I was really talking about the classes here. I'm not really sure this limit remain true with the new compiler advances.
Core team devs will reply you better here.
Yes, someone on the know please clarify if Java will be able to see JRuby subclasses of Java classes. This would be a Good Thing (and I'm guessing it will happen)

A related question on the efficiency front. Let's say that, purely for my Ruby code, I define a new subclass of JButton, 'class MyButton < javax.swing.JButton; . . .; end'. Now, I can use those new features happily in JRuby, and Java will still happily treat it as a button, _but_, how much of a performance hit does pure Java code take when accessing and manipulating that object, since it isn't manipulating a 'normal' Java object. (I'm not looking for exact numbers here, 'big' indicating that method calls/field accesses take a lot longer, or 'small' indicating that don't take too much longer, would be fine :-) ) This is something I'd like to know in general, and also it can potentially be quite important in complex dynamic Swing layouts, where speed is of the essence...

And, if the answer is 'big', an ideas on how much compilation might do to improve this?

    - Why would you use Groovy over JRuby?


Charity action. Well, no seriously, if your devs really fear new language constructs (but IMHO Ruby basics are easy to pick up) or if you really want to use mainly J2EE frameworks and you aren't really interested in Rails nor in other ruby frameworks.

    - Why would you use JRuby over Groovy?


If you need to do efficient web dev and think Rails is great for that, if you like Ruby as a language to use, if you don't want to take too much risk with a language who has a very small community (Groovy vs Ruby communities). If you want to get rich and save the world from the bloatware attacks :)
I think the above is, while fairly accurate, a little harsh. Groovy was designed with Java in mind, and its semantics offer effectively all of the advantages of Ruby, while integrating with Java much more cleanly. In addition, Groovy offers optional typing, IMHO a major feature that all scripting languages should have. (Basically, you can declare a type on a variable, parameter, etc.; if you do so, those declarations are checked at runtime.) This is a convenient way of enhancing code robustness, potentially allows for such things as operator overloading and more efficient code compilation, and also has significant advantages in terms of increasing code readability. Groovy has also looked at what Ruby arguably 'got wrong' and avoided most of those problems (while introducing a few of its own). So Groovy has strengths.

More simply, Groovy does have strengths, some significant, that JRuby lacks.

However, last I heard, Groovy was really quite absurdly slow in places, and though it's hard to be sure, I suspect Raphaël's contention that Groovy's active user/dev community is quite small is correct. JRuby's development has been phenomenal, and (to me at least), it seems clear that the JRuby team is very, very sharp. Then there are other cool things, like the availability of Ruby libs and tools that work in JRuby.

I just wanted to point out that Groovy does have features that JRuby doesn't, and that some of those features are quite attractive.

Ciao,
Ken

Cheers,

Raphaël Valyi.


    Thanks for all your help guys.

    John

    ---------------------------------------------------------------------
    To unsubscribe from this list please visit:

        http://xircles.codehaus.org/manage_email
    <http://xircles.codehaus.org/manage_email>






---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to