Groovy - the End/All - Be/All of scripting ? - No Fluff Just Stuff

Groovy - the End/All - Be/All of scripting ?

Posted by: Andres Almiray on August 23, 2007

Recently on Javalobby a thread was posted, dubbed Groovy - Why is it not the End/All-Be/All of Scripting ?, Nicolas ends the post asking "if you are Java oriented, and commonly use (or are a proponent of) a scripting language other than Groovy, why is that ? Am I missing something ?". Unfortunately the thread became more of a performance battlefield between Groovy and JRuby than solving Nichola's question, so here goes my answer.

Its true that Groovy is closer to Java than other dynamic/scripting languages that run on the JVM, and any Java object is indeed a Groovy object, not many JVM languages can say the same. There are other other niceties like syntax, you can code Groovy exactly as you code Java and later change to a groovier syntax, something many languages don't let you as they impose their own syntax and by "impose" I mean that they define their own boundaries in syntax terms which not necessarily overlap Java's boundaries, the context switch is very hard for some and eventually they either love their new language choice and forget about Java, or hate it and come back. Groovy allows you to call any Java library without any tricks nor special configuration, no special imports, no language hoops, some other languages don't offer that level of integration and some languages don't even care about that integration, they are happy with what they offer and don't need to be that tightly coupled/integrated.

So then again, why Groovy isn't the end/all - be/all of scripting in JVM? because we as developers like choices, perhaps you are tired of Java's syntax and want a refreshing one like Ruby's, or whitespace should be a first class citizen when it comes to serving as block delimiter, like Jython does, or maybe it is performance, or parallel processing, you name it. As much as I'd like for Groovy to be end/all - be/all it will never happen, because it has not been designed to cover all needs and desires, no language has been, same as Java (joke aside on the evil empire, C# has some features Java will never have), but I'm a firm believer that it is a strong contender on the JVM languages ecosystem, not only because of what I have previously stated on its Java integration but also because it is the only language on the JVM besides Java that supports annotations and generics as Java does (Charles Nutter posted an enticing approach for annotation support in JRuby but the proposal is not compatible with Java annotations, they would be more like Ruby annotations).

Coming from Java land your best choice for an scripting/dynamic language on the JVM should be Groovy, as with most of the JVM languages is very easy to learn, but that doesn't limit you to trying other options, it the end you are the only one that can make the decision of which language is best for you. ( hope you stick with Groovy though ;-) )
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »