What Groovy have that kotlin haven't?
1
Antonio Antonelli's profile photoArtur Wójcik's profile photoMichael Kimsal's profile photoIbrahim HALOUANE's profile photo
22 comments
 
What does Kotlin have? Since this is a Groovy developers group, I think it's fair to expect us not to have knowledge of Kotlin; regardless whether that's actually true or not.
 
Bu Kotlin developers can say the same... OK, so: What Groovy have that make you prefer Groovy to Kotlin?
 
LOL! That's exactly my point. Essentially, the responsibility of answering your question falls on you. As for me, I got into Groovy because I wanted to use Grails. Kotlin wasn't, and isn't on my radar.
 
Because I don't care about popularity. For example, when I have a choice, I chose Mercurial over Git. I know it's uncommon nowadays, but it so happens I prefer my own judgment over that of others.
 
Why Grails? Because it uses Groovy which is a language I find to be:
1. elegant
2. effective
3. easy to learn
4. easy to read
5. and Grails makes web development easier
 
+Dean Del Ponte But maybe Kotlin is better for you. It have many thinkg from Groovy. Now I want to compare these languages. Kotlin is looking like better Groovy. So I want to known what Grooovy developer like in Groovy that haven't in Kotlin. I heard that Kotlin is fater than Groovy and you can easier mix it with Java code.
 
Groovy needs @CompileStatic to be written as statically typed language, where as kotlin is statically typed from day 1. Kotlin will have more new features like async/await and it is going to be the language of preference for gradle.

But then groovy has its own advantages. It has almost zero learning curve. Groovy class can accept both java and groovy style of code which is beneficial when you are a beginner.


 
So Groovy is less featured, but easy to learn?
 
how is having both dynamic typing and static typing "less featured"?

"Kotlin will have more new features like async/await"... so it doesn't have it now, but Groovy is "less featured"?

Perhaps you can give us a list of aspects of Kotlin which you like and use, and we can react to that vis-a-vis Groovy's capabilities.

 
+Betanox pierwszy Grails may (should?) be considered SpringMVC++ - it's probably not an 'either/or' question regarding Spring vs Grails, moreso now with Grails 3. Rails is a completely different language - if you've made the decision to be using Java/JVM, Rails generally doesn't make sense.

No idea why you'd think Play! is more popular than Grails. That's not been my experience.
 
Groovy is a completely different language, Groovy is optionally typed and dynamic. You have more power using dynamic programming, not less. And also you cannot compare a language without a context... It doesn't make sense. 
 
I do not understand. Why Groovy is more poverful than Kotlin when Kotlin have extension fuctions data classes and more? So only optional/static typing is the diffrence (and Kotlin powers)? What is better for what?
 
groovy has the same concepts... they have been implemented only 10 to 5 years ago more or less.

If you want to extend a class behaviour you have several options: AST trasformations if you have access to the source code. Metaprogramming, Categories, Category annotation, Mixins or Module extensions otherwise.

Data classes for having automatically tostring equals or hashcode? you have the Canonical annotation... I could go on forever. Groovy has more than 13 years and it's full of features you cannot even imagine and a big ecosystem with a lot of important JVM frameworks (Grails, Spock, Geb, Gradle etc...).
static vs dynamic is a big topic, I can tell you Google uses Python Javascript, Java and more. Facebook uses PHP. Twitter uses Scala. Netflix Java Groovy and NodeJs. Sky uses Groovy and Java. Linkedin Groovy and Java. There is no winner and if there is: is the JVM. Kotlin is a young language I'm not aware of companies using it.

I appreciate you are curious about Groovy and you try to understand the differences from your favourite language (I suppose).
I had only a brief look at Kotlin and I am not interested in it so I cannot really tell you all the differences. I suggest you to try for a bit groovy if you really wanna know. If you have questions I may help to understand.
 
+Michael Kimsal I mentioned Kotlin will have those features in future, i.e it does not have those features currently. My point was Kotlin is designed to be a typed language and groovy can be typed or dynamic. 
 
Maybe Kotllin wnat to be static-styped. It is better for larger web pages and Kotlin is created to be most productive language. So this is only advantage of Groovy over Kotlin? What with extended assertions system in Groovy?
 
Betanox I think you already made up your mind. You already know kotlin is better for larger web app and more productive. what else do you need then!? have a good day
 
Kotlin is created to be productive languages, but Groovy have better farmweworks and it is optional-typed (so static too). And for what Groovy is better. Kotlin is lookin like extended groovy (and well desinged), but with less ecosystem and worser powers. Is it true?
 
There are too many factors to determine what's "best". Determine the factors you care about - language features, ecosystem, tools, etc - and use what fits that. For me, on JVM, it's Groovy when possible.
 
Hi, as other people said, both dynamic & static coding style, ecosystem and better docs and support are sufficient for me.
Add a comment...