The future of Groovy++ is within your Grasp.

Dierk Knig
The-future-of-Groovy-is-within-your-Grasp

There’s something of a buzz around Groovy++ at the moment. With that in mind, JAXenter caught up with Groovy, Grails, and gpars committer Dierk König, to find out more about Groovy++, ahead of his Groovy-centric talks at JAX London….

JAXenter: The new extension of the Groovy
language, Groovy++, is currently a hot topic in the
industry. But what exactly is Groovy++?

Dierk König: Groovy + + is an extension of
Groovy, which makes Groovy code pretty much as fast as native Java.
In addition, you get static type checking plus type inference,
yielding the benefits of compile-time safety but without the noise.
To use the language extension, you only need one additional jar
file in the classpath. Then you can annotate the required code
parts – classes for example – with @Typed. The rest happens
automatically. This approach takes advantage of Groovy’s ability to
hook into the compilation step with AST Transformations. The name
“Groovy + +” indicates that it is still Groovy, and therefore
encompasses the entire beauty of the language syntax while
exceeding the standard characteristics. Interestingly, with
Groovy++ you can mix “static” and “dynamic” capabilities such that
even in annotated classes dynamic components like Groovy builders
can be used. However, this comes at the expense of losing a few
meta-programming tricks.

JAXenter: Who is actually behind Groovy +
+?

Dierk König: The approach was founded by Alex
Tkachman, formerly of JetBrains, creator of the Java / Groovy
cross-compiler, co-founder of G2One and Groovy core committer. More
Groovy core committers have joined recently.

JAXenter: Why does Groovy need an
extension?

Dierk König: Groovy is an extension of Java,
not a replacement. We have always ensured that one can switch
seamlessly between both languages. When optimizing for performance,
Groovy projects have traditionally moved critical parts (often a
few classes only) to Java. That remains possible. But for many
programmers, that was not good enough. They wanted to implement
even these parts with the simplicity of Groovy. That is now
possible.

JAXenter: At JAX 2010 you will
be moderating the Java Language Days together with Markus Völter.
Are you also planning to talk about Groovy + + ? And what else can
conference attendees expect from those days?

Dierk König: I am planning to talk about Groovy
++ at the “Groovy stars in the firmament,” and it is certainly an
issue at the Groovy PowerWorkshop and the Speaker’s panel. The
conference participants will also see an interesting combination of
Groovy + + demonstrated with concurrent programming in Groovy. Here
we are entering new territory, because concepts of parallelism and
high performance applications are finally possible with an easily
understandable language. I would like to mention that at the
moment, Groovy + + is still at an experimental stage and is far
from being finished. The future is within your grasp!

Dierk König will deliver two JAX London sessions and one
shorttalk on topics relevant to the Groovy ecosystem. He will also
present the key concepts of Groovy during the Scala, Groovy, JRuby,
Clojure: Which JVM language is for you? For more information,
please visit the JAX London website.

Author
Dierk Knig
Dierk Koenig works for Canoo Engineering AG, Basel, Switzerland. He is a committer to Groovy, Grails, and gpars and project manager of Canoo WebTest. Dierk speaks at international conferences and publishes in leading software magazines. He is lead author of "Groovy in Action". Twitter: @mittie
Comments
comments powered by Disqus