This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Groovy vs Ruby vs Java

 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What could be it? I've read from google search is that Groovy is a serious competitor to Ruby. Is this true? Both Ruby and Groovy tend to do the same? Advice needed guys!
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jothi,

I like and program in both Groovy and Ruby (and also program in Java and C#).

I have some comments on these languages at
http://www.coderanch.com/t/518/Groovy/Why-choose-groovy

After you read it, please feel free to post any comments or questions here (or there).
 
M Rama
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Venkat,
Here is another question. You have mentioned that Groovy has access to the Java API. Does JRuby not have access to Java API? The reason I ask this question is, if it doesn't that clearly gives an edge to Groovy.

Thanks
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rama, You can access Java API from JRuby as well. However, Groovy enhances that API through GDK. So in Groovy you can use the Java API using what's already provided in the JDK or much more elegantly using the GDK extensions as well. Also, Groovy objects derive from the good old java.lang.Object as well. It is easier to intermix Groovy created objects and Java created objects. That is why I say that if integration with Java is your primary interest, Groovy is a better choice. If you want to use more of Ruby libraries and Ruby syntax on the JVM, and take advantage of the performance JVM will bring, then JRuby is a better choice.
 
M Rama
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Venkat. That gives a good enough explanation of what I was after.

From going through all the threads, it seems Groovy will serve my purpose better, and will be easier to sell to the company than JRuby.

I was very excited about Groovy when I heard Scott's Groovy talks at NFJS. However, I didn't have the right books then to go on. Now that both yours and Scott's book are out, can't wait to get both of them and get started.
 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info.
 
Harrison Reiser
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A clarification: JRuby is interpreted, not meta-compiled.

EDIT: Or, it was until recently. Heh.
[ May 20, 2008: Message edited by: Harrison Reiser ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic