Slashdot Mirror


Your Thoughts on the Groovy Scripting Language?

lelitsch asks: "Does anyone have first hand experience with Groovy? I am just coming off implementing a Plone-based intranet CMS and got hooked on scripting languages and Python all over again. Since most of my projects in the near future are going to be in Java or have large Java components, I was wondering if it's time to trade Jython--which seems to be falling further behind the Python release cycle--for something else. Groovy sounds like a fun thing to look at, but it seems a bit new and thin. Also, what are other languages (JRuby and Rhino, for example) you have used to script in Java?"

5 of 128 comments (clear)

  1. Bean Shell Script by Elias+Ross · · Score: 5, Informative

    From what I've seen, Groovy's a half-baked programming language and unfinished product. See this criticism for a start.

    If you want to do embedded scripting in Java, I suggest Bean Shell instead. As a library, Bean Shell is about 280K, Groovy is about 1.7M. And Bean Shell has been around for a lot longer.

    I'd like to see Sun add closures and better support for lists/maps in Java itself (e.g. a map function). I'm hoping that pressure from Ruby will make the language grow. C# already made them change their mind about Generics.

    1. Re:Bean Shell Script by Will+Sargent · · Score: 4, Informative

      Also see Mike Spille's criticism.

  2. Nothing beats Lua by Cthefuture · · Score: 4, Informative

    for lightness and performance. At least as far as scripting languages go. I can't say I'm a fan of Java but if you insist:

    There is Java/Lua integration in the form of JLua and LuaJava. Possibly other tools as well.

    --
    The ratio of people to cake is too big
    1. Re:Nothing beats Lua by Johnso · · Score: 3, Informative
      Seconded. Lua is the nicest scripting language I've worked with. It embeds beautifully in both Java and .Net.

      http://lua-users.org/ is your friend.

      --
      I'm a signature virus. Please copy me to your signature so I can replicate.
  3. Re:Jython and CPython by bwt · · Score: 3, Informative

    Groovy offers significant advantages over jython and jruby because it was designed specifically to run in the JVM. In particular: a) groovy's class library is the java class library -- you do not subject development teams to two competing sets of class libraries, b) groovy compiles to bytecode which means its interoperability with java is seamless c) groovy can and does actually add syntax and functionality to existing java classes via the GDK.

    The problem with groovy is that it is young. It is just starting into the release candidate phase. Some people have written articles bashing groovy for missing expected features like good parsing error feedback. These articles are unfair since they are evaluating a product that is unfinished. I do not recommend groovy for any production purpose yet, it's simply not ready.