Hacker News new | comments | show | ask | jobs | submit login
Ask HN: What about the Kotlin hype?
10 points by datalist 156 days ago | hide | past | web | 17 comments | favorite
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




I 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.


Thanks 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.


Would 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.


> 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


Apple 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.


I am sorry but you are missing the point of my question, it is not why Google did it but in comparison to Groovy.


Well 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.


> 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.m...


And 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.


The 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.


I 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.


I 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


Can you give an example where Groovy would be less compatible?


Because 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.


I think it would be hard to call dynamic groovy types from java


Kotlin 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


Tooling matters. IDEs matter. Kotlin has Intellij backing.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: