After seeing this link, I want to try Groovy++, but I have a worry;
Is all of Groovy's syntax valid in Groovy++?
For example I can do this in Groovy:
def list = [1,2]
Is the above code valid in Groovy++?
Groovy scripts can use any Java classes. They can be compiled to Java bytecode (in . class files) that can be invoked from normal Java classes. The Groovy compiler, groovyc, compiles both Groovy scripts and Java source files, however some Java syntax (such as nested classes) is not supported yet.
This was mainly due to a feature of the JVM that was blocking dynamic languages. From Java7 a new feature called invokeDynamic greatly improves dynamic code execution; the compiled groovy classes usually share the same execution time of Java (kind of). However, Groovy is still seen as the “slow” JVM language.
IntelliJ IDEA supports the latest stable version of Groovy and Groovy 4 syntax.
The aim (I believe) is to get it to to support as much Groovy code as is possible.
I believe there are currently a few areas that are not working including:
But you can always work around these issues, or don't mark the class that needs them as @Typed
There's a list of differences with code samples at http://groovy.dzone.com/articles/groovycomparetogroovy-part-1
Some of the differences:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With