posted 16 years ago
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.