5 ms·
Why not just use Groovy for everything instead of java ?
by minthd 12y ago
Why not just use Groovy for everything instead of java ?
- sgt 12y agoSpeaking of - how is Groovy doing these days? I looked at the Groovy webpage and I saw ads splattered here and there - never a good sign, I also see that the mailing lists are pretty quiet. Is Groovy dying?
- einrealist 12y agoWhether Groovy is dying depends on how other languages do (like Javascript or JRuby). Groovy has found its niches and will not die soon. For instance, Gradle is built around it or Jetbrains is using it building IDEs like IntelliJ. The ads are probably helping to finance some of the codehaus infrastructure.
- sgt 12y agoA new niche might be: Groovy on Android http://www.infoq.com/news/2014/06/groovy-android http://www.infoq.com/news/2014/06/groovy-android
- frowaway001 12y agoI'd say not too good. Of course there are those two projects everyone mentions, Grails and Gradle, but I would say it's more correct to describe them as the only two niches where Groovy is actually used a bit, it's not like Gradle and Grails are just "flagship products" of a greater ecosystem. For both, there are already better replacemens available, so I don't think they will grow much in the future.
- atomi 12y agoWhat do you replace Gradle with?
- frowaway001 12y agoI'm extremely happy with SBT.
- vorg 12y agoIt's a stretch to say that Gradle actually uses Groovy. Groovy 1.7 added a "DSL" into its parser whereby we could omit parentheses in function calls. Gradle uses this facility for its CSS-style syntax. In theory, we can drop out of the DSL to add Groovy code (as you can with Leinengen to add Clojure code, etc etc) but in practise virtually no-one does that. I've checked the Gradle build scripts for some large open source projects, even Groovy's own build scripts, and nowhere have I seen anything other than the DSL syntax used. Gradle 2 brought the facility where you could configure a build using any JVM language via an API, and now Java 8 has lambdas I suspect this facility will get used more, and Gradle might even replace Groovy with a custom lightweight DSL for builds not requiring extra programming.
- allengeorge 12y agoThey're moving to a new site: http://beta.groovy-lang.org/ http://beta.groovy-lang.org/
- vorg 12y agoThe site at groovy.codehaus.org doesn't mention anything about the new site (actually www.groovy-lang.org). Until it does the new site is unofficial and just one of the 5 despots at Codehaus trying to grab control of the product away from the other 4 despots there. That despot has tried other tricks like soliciting for subscribers to his weekly "news mailout" which is mainly links to tweets mentioning Groovy.
- allengeorge 12y agoMmm. I got this from Guillaume Laforge's blog: http://glaforge.appspot.com/article/a-new-groovy-website-in-beta http://glaforge.appspot.com/article/a-new-groovy-website-in-... He's one of the core groovy developers - unless he's one of those despots you're talking about?
- vorg 12y agoIf an old site for anything (here, groovy.codehaus.org) doesn't mention it's moving to a new site (here, www.groovy-lang.org) then I question what's going on. As for your link, it's a link to a personal blog and not an article on the Codehaus Groovy site so it's just as unofficial as the supposed new site for Groovy.
- jdbernard 12y agoThat's what I do. It has the added benefit that anything you do to improve using Groovy can be leveraged with plain Java too.
- vorg 12y agoAs also can Clojure though with less bugs.
- lmm 12y agoBecause type safety is actually really valuable? /uses Scala for everything, from scripts to backend. Groovy usually translates 1:1 into Scala, but without sacrificing type safety.
- minthd 12y agoIn current version of Groovy you can mix static and dynamic typing in different sections of code by telling the compiler what are your preference.
- frowaway001 12y agoWhy would you ever _not_ want typechecking?
- cheepin 12y agoStatic typing comes with benefits and costs. If you don't want to pay the costs and can forego the benefits, dynamic typing is fine.
- paulddraper 12y agoGenerally people that don't like explaining what they mean to a computer.
- frowaway001 12y agoIf your type system requires explaining things to a computer, your type system sucks, not static typing. I use types because the compiler can explain things to me.
- lmm 12y agoUp to a point - I found the static support was quite buggy and I got the impression not many people were actually using it. Has it improved in the last few years?
- einrealist 12y agoThere are not many technical reasons for not to do that (like the speed of invokedynamic). It has been a consideration for at least one project I was part in.