Laforge: You can make the code more expressive, for example, for defining your algorithms, whereas a language like Java is usually more verbal. So in terms of maintenance, because you spend more time reading your programs more than you spend writing them, it's even easier to read and maintain the code. And we bend the Java syntax to allow the creation of domain-specific languages. Because the syntax of Groovy is very flexible and you can write almost-plain-English sentences, business people are easily able to write business rules and domain concepts in a concise and very readable way.
InfoWorld: The latest version of Groovy was version 2.0, released in June. What are the principal improvements in it, and what improvements are planned for future versions and when might those arrive?
Laforge: There are essentially three big things in Groovy 2.0. Let's start with what I call the static theme. Groovy's nature is to be a dynamic language, but we also added new features, such as static type checking. We also built on that feature to do static compilation, which is about generating the same kind of bytecode as the Java C compiler. The net result is that you've got the same kind of type safety as you have with a language like Java, as well as the same speed as Java.
Typically, dynamic languages are slower than Java. But Groovy is very, very fast, thanks to those features, and they are safe to use for Java developers.
The second thing is around everything that happened in the Java language and in the Java development kits with Java 7 and JDK 7. [With] the syntax of Groovy being very close to Java, we added the same kind of syntax enhancements that were added to Java 7.
There's also another aspect related to the JDK and especially the Java Virtual Machine, which is the support of invokedynamic. Invokedynamic is a new bytecode instruction at the JVM level as well as a set of APIs, which have been created especially for the support of dynamic languages.
The last thing is about modularity: We made Groovy more modular.
InfoWorld: What improvements are going to be in Groovy in the future?
Laforge: In Groovy 2.1, we will be finishing work around invokedynamic support to completely use all the aspects of the invokedynamic bytecode instruction as well as the various APIs to further improve the performance of all the dynamic aspects of the language. We are also going to continue improving the support at the language level. It's going to be available in a couple of months or so, definitely before the end of the year.
InfoWorld: What is going to be in Groovy 3.0, and when would that be out?