Groovy OJUG Talk last night
Last night at OJUG (Omaha Java
Users Group), Scott Hickey gave an awesome talk over Groovy. I wish I had a link to his website,
but I didn’t see one. He is the lead on the groovy Eclipse plug-in, and is currently finishing
an article for the IBM
Groovy series covering groovy and spring. He’s been writing production groovy code
for a few years on a mission critical financial app.
He covered some great code examples comparing java and groovy. Things seem to be written much easier (as like most dynamically typed languages), and it’s cool that groovy runs in the same jvm as the rest of the code. From what I could tell, the syntax looks a lot like Ruby.
I liked his example showing how he did some Test First development by using a Map in his test, and later replaced with an object because of the dynamic typing.
He stressed that groovy by design uses BigDecimal behind the scenes, which is great when used in math statements. 1.1 + .1 should = 1.2, but in java it equals 1.19999999 except when using BigDecimal. He had some great examples here too.
He mentioned catching exceptions only when you want to. This was a bit scary to me, but I think in practice I might agree.
Thanks to Scott for a great talk, and to Matt for pulling it all together…