• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Groovy versus JRuby

 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Scott,

I've seen the hype for both. Ruby by itself is a very popular language. Can you give me some compelling reasons why I should choose Groovy over JRuby? It also seems that Sun keeps pushing Ruby as another first-class language citizen that runs in JVM.

Thanks.
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Freddy Wong:
It also seems that Sun keeps pushing Ruby as another first-class language citizen that runs in JVM..


Well, I have to disagree with that. Groovy is scripting for java in the first place, while ruby isn't. JRuby was created to implement ruby which is becoming very popular. Groovy has its own JSR, which means that Sun is supporting it more. I believe that sun is increasing its support for ruby, because ruby is already gaining popularity, that it might eat a part of java's market share. By supporting it, sun is ensuring that a lot of the people who might consider leaving java for ruby would still use ruby withing the JVM, and it might even get some of the ruby developers to try it out in the JVM, to get the advantages of java together with ruby.
 
S Davis
Author
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, the question boils down to which language do you already know. If you already know Ruby, then JRuby is a natural fit. If you already know Java, then you'll be hard pressed to find a language that is more Java-like.
[ February 19, 2008: Message edited by: Jim Yingst ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops - I hit edit when I meant to hit reply, and I killed the rest of what Scott just typed. I'm really sorry about that, Scott. I noticed the problem too late to recover the original, it seems. If anyone else happens to have the text of what Scott's post said before I killed it, send it to me and I'll replace it above.

The reason I was replying in the first place was to clarify - when Scott said "you'll be hard pressed to find a language that is more Java-like" - I assume he meant to add "than Groovy".

Sorry again, Scott and everyone.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I recall, the rest of Scott's reply was to consider several possible situations. If you already have a Ruby on Rails application (or a group of good RoR programmers) and are looking to add some Java enterprise power, you should probably use JRuby running Rails. If you have an application using Python, use Jython. And if you have a Java application that uses Spring and Hibernate (that you'd like to simplify and/or enhance), then Groovy will be a particularly good fit for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic