• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Why choose groovy?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What differentiates groovy from other dynamic languages running in the JVM, such as Jython and JRuby? What are the benefits of choosing groovy over these other languages?

Thanks!
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding to the question, since Groovy is primarily targeting Java developers, isn't Ruby a better bet since it attracts .NET developers as well. With capabilities of Ruby and Groovy being similar, isn't going the JRuby way a better choice.

What has been your experience with the .NET world embracing Ruby? Also, do you feel there being any big drawback in doing JRuby instead of Groovy?
 
Author
Posts: 135
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I program in Java and also program in .NET (I wrote the book ".NET Gotchas" a few years ago). I program in Ruby and also in Groovy. I believe in using the right language for the right job. One thing I try to avoid is bias or prejudice towards any language (OK except when it comes to VB perhaps, just kidding).

Using Ruby because it runs natively, on JVM, and also on DLR is not a convincing reason to select Ruby or JRuby for my project on the JVM.

If my project is predominantly a Java project, if I have to interact heavily
with Java libraries and APIs and frameworks, and at the same time I want to take advantage of the capabilities and features of a dynamic language, I find that Groovy is a better choice. I can leverage the strengths of two languages in one.

On the other hand, if I have really nothing to do with Java on a project, but want the dynamic language capabilities, I tend to prefer Ruby (assuming it serves my needs that is). If I want to deploy my solutions on the JVM, purely from the point of view of organizational deployment issues and restrictions, or if I want to take advantage of the performance gains I will get by using the JVM, then I prefer the Ruby/JRuby route.

Now from the point of view of learning, which one should you select? If you are already on a Java project, I suggest Groovy. If you are not on a Java project, I suggest Ruby. Once you learn one, you can pretty easily pick up the other if you need to. Ignoring the syntax differences and a few other capability differences, there is a common set of concepts and paradigm that you will get introduced to when you learn either one of them and you can use them when you switch to any of the other languages that offer similar concepts.
reply
    Bookmark Topic Watch Topic
  • New Topic