Feeling Groovy

6

I’m having a great time this weekend at No Fluff Just Stuff in St. Louis. I’ve been vaguely aware of Groovy for a long time and my early impressions were that from a language point of view it seemed kind of thrown together and not really the result of a consistent vision.

But I went to a couple Groovy talks this weekend from Jeff Brown and Matt Secoske about Groovy and realy enjoyed looked at Java through this different lense. And generally, I was impressed at the way Groovy hangs together. There are a lot of aspects that reinforce each other. For example, if you didn’t have duck typing, closure support would be messy because you would have to specify all the type information (just like the Java closure proposals).

I also thought it was interesting to see how many of the Java 7 proposed features (short instance creation, closures, properties, xml support, bigdecimal operator overloading) already have some equivalent in Groovy and how having the combination of those features can really give you a whole that is really quite a bit more readable and easy to write. I’m not sure yet if that makes me want to have those features in Java too or if we should just say that these feature sets will have better instantiations in other languages (be it JRuby, Jython, Scala, Groovy, etc) and the historical and backward-compatibility burden in Java is just too much too support it cleanly. I need to think about that one some more.

Another thing that occurred to me is that it would be fantastic to have integrated Terracotta clustering support when creating POGOs (plain old Groovy objects), just like it’s great to have support for clustered POJOs. I’m not sure how nasty it would be to actually make the Terracotta bytecode manipulation work with Groovy bytecode manipulation in happy and compatible ways. Seems like specification of locking in Terracotta might be a lot tougher given the dynamicity of Groovy (or any of the other dynamic JVM languages) but maybe I’m wrong. So, if you’re looking for a fun but reasonably hard project, this would be a great one (and Terracotta would be happy to host your work in our forge).

Comments

6 Responses to “Feeling Groovy”
  1. IHMO Scala shows well that closures and static typing can play well together – thanks to type inference.. however I have to agree about the Java proposals :-/

  2. Jeff Brown says:

    Alex,

    It was great to see you at the show this weekend. I am glad you enjoyed some of the Groovy sessions. Good stuff! :)

    The Terracotta session was really really interesting. You guys are doing some slick stuff there.

    If you guys get involved with adding any Groovy-isms to Terracotta, drop me a note.

    See you soon.

    jb

  3. Hi Alex,
    Speaking of Terracotta and Groovy, it reminds me of this article: http://javathink.blogspot.com/2007/07/distributed-groovy.html
    Perhaps it’s what you had in mind when you said mixing POGOs with Terracotta for creating some distributed beans?

  4. Alex says:

    Yes! The problem with not having been at Terracotta very long is that all the smart people there have already thought of (and implemented) everything cool I think of months ago…. :)

  5. Nonetheless, we can even go further and wonder how to best distribute a Grails application with Terracotta? That’s probably the next logical step now we know distributed Groovy POGOs work great? :-)

  6. I was as excited as Guillaume until I read that article a little more closely. It does *not* in fact cluster POGOs. It just allow access to clustered POJOS from Groovy. Not remotely what I had in mind!

    I keep coming up against this question because the truth is I *need* a way to cluster POGOs a la Terracotta. You have no idea the problems this would solve (and not just for me, either.)

    I have heard alternately that “it shouldn’t be that hard” to “wow, that would be really hard”. I wish to heaven I knew which it was. I just don’t feel I have the strength to become a Terracotta hacker and solve this problem for the world. I’ve got two open source projects of my own to manage as it is.

    An open plea to the world of Terracotta and deep Groovy hackers: solve this problem, please pretty pretty please!!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!