I’ve been watching Groovy since (approximately) its inception. Groovy is a very Ruby-esque language but with roots in Java. I’ve been meaning to do something with it but have just never gotten around to it. I had heard tell of it’s beautiful abilities to parse XML. I knew it had some degree of interoperability with Java (Groovy scripts execute within the JVM) but I didn’t realize how totally complete the interoperability could be. You can write and run Groovy so that it is plain Groovy, you can write Groovy so that it leverages the Java standard library (or any objects created in Java) or you can compile .groovy files into .class files and treat them like normal Java classes – seamlessly create Groovy objects in Java and vice versa, pass the objects back and forth. Really neat. Do whatever lifting in whatever language you like, completely flexible. The Groovy compiler (groovyc)Â will happily pass compilation of non-Groovy (.java) files to the standard javac compiler so you only need to have one line in your ant script to compile both languages.
After writing the XML parser for my current project in Groovy (the rest of the project is Java) I wrote a couple of other stand-alone Groovy scripts to become more familiar with Groovy and I will say I am very impressed. If you’re a Java programmer (or just a language lover) you should check out Groovy. And for a nice bonus, IntelliJ IDEA comes with a nice plug-in for editing .groovy files.