The Artima Developer Community
Sponsored Link

Weblogs Forum
Does Groovy Matter?

16 replies on 2 pages. Most recent reply: Feb 27, 2006 1:08 PM by j m

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ « | 1 2 ]
George Jempty

Posts: 2
Nickname: jemptython
Registered: Feb, 2006

Re: Does Groovy Matter? Posted: Feb 18, 2006 4:54 AM
Reply to this message Reply
Advertisement
This is just an idea that I have not even attempted so it may be of no value whatsoever. However I thought it would be cool if Groovy could be used as a scripting alternative to the convoluted XMLBeans compilation process.

j m

Posts: 1
Nickname: joshm
Registered: Feb, 2006

Re: Does Groovy Matter? Posted: Feb 27, 2006 1:08 PM
Reply to this message Reply
Groovy is great. It's a python quality programming experience combined with java quality libraries.

I found Jython difficult because I had to context switch between using python libraries or Java libraries. Like string.replace() or String.replace(). When I wanted to write my own libraries it was always a battle between writing in Java or Jython. Groovy was a great solution because it was real scripting with java.

I generally prefer Python to Java but end up writing most of my code in Java. This is either comes from needing java libraries or needing to fit in with whoever I'm working with. The Java libraries tend to be the bigger issue. For example Hibernate is superior to marshalling (for my needs). If I want to draw charts and present them as gifs, JFreeChart does a lot that no python package accomplishes. 2 years ago I wrote a project with XML parsing and emitting needs and Jdom was superior to anything on Python. Right now I'm deeply involved in a personal project that needs to access http services as if it were a real browser. HTTPClient is awesome at this, no current python project comes close (or did 5 months ago when I started).

Groovy was seemingly the best of both worlds, but I found that developing with it was slower once I started using eclipse with Java. Eclipse removes most of that annoying translation when you have to move from what's in your head to java's pernsinkity syntax. If I want to iterate over an array of HashMaps and append the Values of some particular Keys to anther particular String, typing "for" and ctrl-Tab and some other easy to remember incantations will get me there. Without having to position 6 different parantheses, brackets, semicolons and variable declarations.

Groovy still had bugs, didn't really report the correct line number for my bugs and still had syntax warts. Eclipse also spoiled me with all it's library look up and instant compile time bug finding excellence. I never thought I would bail on emacs, but even going to python code in emacs feels a little painful now. Groovy is a bit worse than python.

Some take home points:

Groovy is still competitive for a couple of reasons. Namely it is the best Java style scripting language. Bsh and rhino don't come up to python's level of psuedo-code like clarity. We need to script Java because it's vast libraries are a wonderful thing to glue code together.

My eclipse generated code is still verbose, so a good "groovy for Eclipse" would probably put me back in the groovy camp.

Scripting languages are competing with Eclipse or Visual Studio or IntelliJ style compiled languages, not a bunch of text files. It is not enough that your code sample looks much cleaner or cooler. The same goes for languages like Lisp or your new powerful language. An Eclipse/Intellij plugin should be the Third priority when you try to sell your new language. (The first two are language design and libraries). That means you Pythonistas!

Libraries libraries libraries. One of the best things you can do for a language is port popular libraries to you language of choice. The is something Lispers never do. Something that Pythonistas do well and could do better. And something that Java Junkies don't worry about because they have hordes of programmers and IBM and Sun.


-Josh

Flat View: This topic has 16 replies on 2 pages [ « | 1  2 ]
Topic: Re-Introduction Previous Topic   Next Topic Topic: Software as Services

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use