5 ms·
Ask HN: What about the Kotlin hype?
With the recent 1) frenzy about Kotlin I was particularly curious about its introductory talk at Google's IO, https://www.youtube.com/watch?v=lH5aywLo-Ic&t=9085.
One thing that I seem to miss is what the advantage of Kotlin is in the first place - NOT in comparison to Java, in comparison to Groovy. There seem to be a handful of features which are neither present in Java nor in Groovy 2), but the majority of its features and syntatic "sugar" has been already available in Groovy for the past 14 years (some maybe only for five, if you count since 2.0).
I dont want to devalue Kotlin but at the same time it seems Kotlin is getting a lot of praise for things it literally just copied straight from Groovy 3). Even the speaker briefly acknowledged the similarities to Groovy, https://www.youtube.com/watch?v=lH5aywLo-Ic&t=10426.
Did I miss anything blatantly obvious (apart from 2)) or may we just have yet another hype?
Thanks
1) Referring to Google's announcement to support it natively on Android
2) Non-nullability (within Kotlin's scope at least) comes to mind, possibly static typing (though Groovy does support it)
3) Properties, lambdas, extensions, many syntax elements
- moondev 9y agoKotlin compiles to the jvm so it has always "supported" Android. The difference now is that Android supports kotlin. It's now a first class citizen in the ecosystem in regards to docs, libs etc
- crispytx 9y agoApple came out with Swift to make iOS development easier. I think Google is trying to do the same thing by adding official support for Kotlin in Android.
- datalist 9y agoI am sorry but you are missing the point of my question, it is not why Google did it but in comparison to Groovy.
- brianwawok 9y agoAnd groovy stole x from ruby and y from JS which stole from C which stole from Smalltalk. Who cares? Use Kotlin or not. Don't worry about perceived idea theft.
- datalist 9y agoThe issue is not who "stole" from whom but that people now seem to claim and believe that Kotlin's features are unique to Kotlin and for the majority of its features that is not true, they were taken one-to-one from Groovy.
- brianwawok 9y agoI don't know a single person that like a Kotlin because it us revolutionary or new. People like it because it is a less bad Java. Most of the benefits with fewer drawbacks. I personally prefer scala but the market doesn't seem to be going that way.
- crispytx 9y agoWell you probably already know this, but I think Google is promoting Kotlin over Groovy because of their association with JetBrains. I'm sure if Google developed Android Studio from scratch instead of using JetBrains IDE as the basis for Android Studio, maybe they would have chosen Groovy. So yeah, they just as easily could have chosen to add official support for the Groovy programming language and achieved the same goal of making Android development easier.
- vorg 9y ago> I'm sure if Google developed Android Studio from scratch, [...] maybe they would have chosen Groovy I'm sure they would have also developed the build language from scratch also, and I doubt it would have been as cluttered as Apache Groovy. Check out the Groovy developers mailing list [1] to see how inactive Groovy development is nowadays. [1] http://mail-archives.apache.org/mod_mbox/groovy-dev/201705.mbox/browser http://mail-archives.apache.org/mod_mbox/groovy-dev/201705.m...
- kristoft 9y agoI think, one of the main features that makes Kotlin a bit better than other JVM languages is full compatibility with Java. And by full I mean 100% with no exceptions. And Kotlin became good choice for android developers a long ago before io2017) Official support means a better tooling, nothing more
- datalist 9y agoCan you give an example where Groovy would be less compatible?
- kristoft 9y agoI think it would be hard to call dynamic groovy types from java
- vorg 9y agoBecause Kotlin is the language being financially supported by a business, perhaps it's better to ask for an example where Groovy is more compatible than Kotlin. The only example I can think of is scripting in Grails. Even Grails 3, which was released over 2 years ago at the same time VMware ended its paid support for Groovy, only uses Groovy for its scripting.
- a-saleh 9y agoI think the main reason is, that Groovy seems to be abandoned, while Kotlin is in development, with JetBrains backing it. But as far as language features support goes ... Kotlin, Ceylon, Groovy, new versions of C#, most of the times the language features are never that far apart (and they definitely do steal all features among each other) and you choose based on library and tooling support, familiarity and popularity. Kotlin will come out among the top w.r.t. tooling support, because JetBrains will support it in its ide and library support because of its java compatibility. The android announcement pushes its tooling story even further.
- datalist 9y agoThanks for your response. My issue here is not so much that Kotlin borrowed features but that it appears many credit Kotlin now for those feature, when in fact most of it has been already available under Groovy a decade before Kotlin came out.
- limeblack 9y agoWould you like examples of what makes Kotlin more unique or different then Groovy? Just at a glance it appears scoping is handly differently then groovy. Also the official language says it supports compiling to JavaScript on the website while its another project for Groovy. Gooscript hasn't been available since 2012. I wouldn't be surprised if Google hopes or plans for people to adopt this for both web and Android development.
- vorg 9y ago> Gooscript hasn't been available since 2012 Grooscript 1.3 was released in Sep 2016, only 8 months ago [1]. It does only have one or two developers working on it part-time as far as I can tell. I can't imagine too many people would want to put time into Grooscript (Groovy for Javascript) when Apache Groovy (Groovy for the JVM) is languishing, though. [1] https://en.wikipedia.org/wiki/Grooscript https://en.wikipedia.org/wiki/Grooscript
- pacala 9y agoTooling matters. IDEs matter. Kotlin has Intellij backing.