Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Groovy versus JRuby

 
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.
 
Ranch Hand
Posts: 471
Mac OS X Hibernate 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.
 
Author
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 ]
 
Wanderer
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
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.
 
I promise I will be the best, most loyal friend ever! All for this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic