Groovy vs Scala [vs JRuby vs Closure vs Jython]

I'm planning to broaden my perspectives in JVM platform, and I've got a dilemma: what should I learn first? Could you please explain, what are the advantages of Groovy, Scala and other languages for JVM? Thanks.

Chosen as Best

JRuby and Jython. Both of these particular compilers are not quite there yet, mostly because JVM doesn't play nice with dynamic languages, so they have to go through some hoops.
Now, Ruby and Python are definitely two of the most important dynamic languages today. While they certainly compete against each other, they are quite different by themselves, in the community and philosophy.
Python is about choosing the Right Way and sticking to it. It's particularly conscious of form, and think form and semantics should not be dissociated, the most obvious example of which is the decision to delimit blocks through identation. As long as the particular decisions taken in Python agree with you, its a language that will please people who value stability.
Ruby is about going Your Way, the most striking example of which is the eagerness with which Ruby developers extend the language and libraries, sometimes to the detriment of interoperability when using multiple libraries. Their response to this late development is also quite telling: they are working on ways to keep doing that without causing such problems. People who like to tinker may well prefer Ruby.
Python had definitely a head start -- back in '99 it already had a name to it, while Ruby was slowing making inroads as an alternative to it. Ruby would only become a strong competitor when Rails came, and Ruby on Rails took the web by storm, leaving a path of copycats (for instance, Groovy's Grails).
Both languages have very strong community and features, and the most likely factor of choice is personal, subjective preference.
Which get us back to Scala, Groovy and Closure.
Groovy's strongest point is that its syntax is very, very close to Java, so a Java programmer can enjoy the benefits of a dynamic language almost effortlessly.
Closure's strongest point is that it is a Lisp. It has some advanced features, such as software transactional memory, but, in the end, the fact that it is a Lisp is more likely to influence one's decision to adopt it or not.
Finally, Scala is statically typed, which puts it in an entirely different class from all others. What often makes people group it together with the others is that it is a very concise and overhead-free language, like those dynamic languages. In that sense, a Java programmer may well be more comfortable with it than Groovy, as one gets the benefits of concise programs without giving up static typing.

No comments:

Post a Comment

Please Provide your feedback here