# @CompileStatic

Groovy is a dynamic language - one with a very nice style and syntax in my opinion - and one of the things it has that some of the other languages it tends to compete* with like Python and Ruby is that it is based on the JVM. Because of this it always had the super easy interoperability with Java as a selling point. Additionally, even beyond newer languages like Kotlin, early on with Groovy you could always theoretically add some types, a bunch of semicolons, and verbosify a few things and viola - rename your .groovy file to a .java file get all the benefits that come with pure java.

Compilers doing more has some real benefits. I believe one under-stated advantage of Groovy and Grails is the way it gives a best-of-both-worlds approach. Grails itself takes advantage of compile time metaprogamming extensively under the hood. This gives it very good performance characteristics while keeping a lot of the convention over configuration magic that is so appealing to developers. The Groovy application code within Grails though also has access to this.

I will just link to some of the project documentation on this:

pros and cons of static compiliation:

characteristic static dynamic
performance improved hindered
writing harder easier