Picture of stu

Grokking Groovy

  • Posted By Stuart Halloway on February 07, 2008

Low ceremony languages are surging in popularity. Developers are discovering the pleasure of working in a language they can mold to meet their problem. For developers new to these languages, the problem is often where to start. There are so many! Should it be Python? Perl? Ruby? JavaScript? Lua? Lisp? Groovy? Smalltalk?

Despite differences in syntax, these languages share important similarities. For example, they tend to make it easy to create, pass around, and invoke functions, even at runtime. If you have lived long in the kingdom of nouns, this is certainly an interesting change.

But if you are choosing a language to learn, you are probably more interested in how the various languages are different. The place where the low-ceremony languages differ most is in their support for metaprogramming. Unfortunately, good information on this topic is hard to come by. I am always on the lookout for good books on the metaprogramming features of languages, and Groovy finally has one (third). Part Three of Venkat Subramaniam's Programming Groovy is devoted entirely to Groovy's metaprogramming features. Sweet.

I won't tell you which language to use (unless you drink a Lagavulin or two with me), but if you are considering Groovy, read part three of Programming Groovy.

Comments
  1. Bob LeeFebruary 07, 2008 @ 10:02 PM

    I don’t understand how someone can be so dogmatically against static type checking. It’s as if you’ve forgotten what it’s like to maintain someone else’s code. Must be nice.

  2. StuFebruary 08, 2008 @ 12:04 AM

    Hi Bob, I am not against static type checking. I am against high ceremony. In mainstream languages today, there is often a strong correlation: static typing and high ceremony come together. But I don’t think the correlation has to be nearly so high. Maintaining code is very important to me, regardless of who wrote it. We are involved in projects in all kinds of ways: green field development, project rescue, legacy development, and maintenance to name a few. I think that ceremony is a key enemy of maintenance. I’ll post more on this shortly. And I am not dogmatic. If Lagavulin is unavailable Laphroaig will do nicely.

  3. Clinton BeginFebruary 08, 2008 @ 05:13 AM

    Can’t wait to read Venkat’s book! I read Groovy in Action, which was a really good book too. Venkat’s seems to be unique enough that it warrants a read.

    As for the languages:

    • Python? I look forward to the day I need it. Really.
    • Perl? I’d rather staple my eyelids to the carpet than see Perl ever again.
    • Ruby? Currently enjoying this dish.
    • JavaScript? A necessary evil. I don’t think we have a choice here.
    • Lua? WTF
    • Lisp? ((((no (i don’t) care (how) smart (it makes) me (look to) know it))))
    • Groovy? Currently finding any excuse to use it in a real application.
    • Smalltalk? My opinion lies somewhere between those of Perl and Lisp.

    Not in the same category, but other languages on my 2008 list: Scala, F#.

    Cheers! :-)