3 ms·
This may sound ignorant, but if you're going to use another JVM language, why not use JRuby (if you want to stick with a Smalltalk/Modula-3 derivative), Clojure
by strlen 16y ago
This may sound ignorant, but if you're going to use another JVM language, why not use JRuby (if you want to stick with a Smalltalk/Modula-3 derivative), Clojure (if you like Lisp and want STM) or Scala (if you want the static type checking, speed, built in support in IntelliJ)?
This is a serious question: several people I respect (who are smarter than me and thus well capable of learning new languages) are using Groovy for their projects and I am wondering why?
- grails4life 16y agoOf those languages you mention, Groovy has the most java-like syntax. So maybe since its easy to pick up and does what they need, there is no need to learn/use those other languages.
- minalecs 16y agowell the main reason I wouldn't use JRuby is because .. by programming in just Ruby, you get benefit of all the c extensions that you aren't able to use in JRuby and not sure about rails support on jruby. I would just use it without jvm. The other reason to go with groovy/grails is the grails plugins community is very active.
- mindcrime 16y agoWell, Groovy has been around longer than Clojure, IIRC, and maybe longer than Scala, or about as long. So I'd guess that quite a few Java people who were interested in alternatives got exposed to Groovy before Scala and Clojure started gaining traction. And since there are only so many hours in the day... at some point you have to start building stuff instead of just learning new languages. Also, Groovy's syntax is very Java like. In fact, Groovy is pretty close to a superset of Java, so you can often - if not always - rename a .java file to .groovy, and compile it with groovyc and run it. This makes it easy to leverage your existing knowledge of Java, while slowly working in the idiomatic Groovy. All of that said, I personally plan to learn both Scala and Clojure as well; and will probably take my Scala book to the Triangle JVM Hack Night meeting tomorrow night and spend a couple of hours poking at Scala.