3 ms·
I love groovy. Anytime I have something 'Java-JVM' that isn't performance critical, I write it in groovy. But even that mindset is falling away given the abil
by mbell 14y ago
I love groovy. Anytime I have something 'Java-JVM' that isn't performance critical, I write it in groovy. But even that mindset is falling away given the ability to use @CompileStatic.
The best part of groovy to me is that I can use it where I want, when I want, with a single POM dependency and without (generally) having to think about how it interacts with existing Java code.
When I write a Jersey controller, I start in java, if I hit a point where I'm thinking "this would be easier with a closure" or "defining an entire inner class here is stupid", I stop, change the file ending from .java to .groovy, and code away.
- vorg 14y ago> Anytime I have something 'Java-JVM' that isn't performance critical, I write it in groovy. But even that mindset is falling away given the ability to use @CompileStatic. The @CompileStatic-based static compilation in Groovy only began being written 1 year ago (in October 2011), and was only mature enough to be included in a production-ready version of Grails (version 2.2) a few weeks ago (December 2012). Scala has had static compilation from the very beginning, and was rewritten between Scala 1.x and Scala 2.x. Stick to dynamic typing if you're using Groovy, even stuff that isn't performance critical.