4 ms·
I looked into groovy recently, and even as a python fanboy I can see how awesome it is for someone who already knows java. It looks extremely close to both pyth
by drats 16y ago
I looked into groovy recently, and even as a python fanboy I can see how awesome it is for someone who already knows java. It looks extremely close to both python and ruby, and you can drop down to java anytime, use java libraries anytime. It even has a pretty good rails clone called grails. Can anyone from the java community explain to me why it hasn't taken off more? Perhaps other JVM languages have stolen people away or split the people looking for something else. I suppose with a 1.0 release in 2007 vs the early and mid 90's for python and ruby respectively I should perhaps wait and see.
- gaius 16y agoGroovy is very nearly to Java as Tcl is to C, which is great, but a common use case for scripts is as a command-line tool and no-one wants to cart around JVM startup times and memory requirements for that when Python is a already perfectly good language.
- ronnix 16y agoScala and (to a lesser extent) Clojure seem to be more popular choices among (ex-)Java people nowadays.
- ewjordan 16y agoI think speed has a lot to do with it, last time I checked Groovy was more than an order of magnitude slower than Java, whereas Scala (which has many of the same benefits as Groovy) was much closer. A 2x speed hit might not be a problem, but for a lot of people (myself included), 50x is way too much of a penalty when you've got options that offer effectively the same benefits with vastly better performance. Maybe things have improved since I last checked it out, but I'm not sure.
- lukev 16y agoGroovy is nice in that it has nearly a zero learning curve (coming from Java) and provides all the benefits of a dynamic scripting language. The downside is that it is dog-slow (up until recently, it didn't even use explicit types that were provided and always used reflection under the hood) and has some flaws in its design, which make it a bit unpalatable once you really start getting into it. The consensus of my office seems to be that Groovy/Grails makes you twice as productive as Java for 2 days, then you loose it all again fixing some stupid, incredibly non-obvious problem on the 3rd.
- nickbarnwell 16y agoI just finished building an internal web application for my school entirely in Java. From start to finish it took about eight hours, roughly the same amount of time it would've taken in Python/Django or RoR, thanks to the Play Framework. Java doesn't need to be ridiculously verbose, others have mentioned much of that verbosity stems from basic functions not being included in the standard library. Python's opening of a file isn't any more elegant than Java's if you look at the code behind open(), it's just abstracted away.
- xiongchiamiov 16y agoThere are some things that Java just is more verbose at. For instance, my pet peeve - accessor methods. Most other modern languages have properties, which allow you to only write special cases when you need them.
- nickbarnwell 16y agoThis is one of the things that Play does well; setters and getters are generated for you at runtime so you only have to write it as: public Date submittedAt; and set/get it as you would any other variable. Easily one of my favorite things about the framework, and saves my { and } keys work as well.