Live data from Hacker News

Kotlin is now Google’s preferred language for Android app development

techcrunch.com

91–99 of 99 posts

Re: Kotlin is now Google’s preferred language for Android app development

#91
post #87
post #84

Earlier quoted context omitted.

The rise-and-fall adoption of Scala and Apache Groovy is because their whole rationale for existing was to be a better something. Groovy (2003) tried to be a better Beanshell (1998) by adding closures to it. Beanshell tried to be a better Java (1995) by adding dynamic typing to it. Scala (2003) tried to be a better Java by adding definable operators to it. But when something even better comes along, their rationale f…

I think it's not just that Groovy and Scala were temporarily a better Java that was eventually overtaken by the next even better Java, I think they were not sufficiently better. Better at some things, but with a cost not everybody wanted to pay. Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex and occasionally hard to read. I haven't really tried Kotlin yet, but my impression is that…

Kotlin's main improvement on Java is its seamless integration with the most popular IDE on the JVM. Of course, it helps that IntelliJ and Kotlin are put out by the same company, but Jetbrains did emphasize when they first announced Kotlin that its integration with IntelliJ would be top priority. Groovy and Scala never had this improvement.

Re: Kotlin is now Google’s preferred language for Android app development

#92
post #91
post #87

Earlier quoted context omitted.

I think it's not just that Groovy and Scala were temporarily a better Java that was eventually overtaken by the next even better Java, I think they were not sufficiently better. Better at some things, but with a cost not everybody wanted to pay. Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex and occasionally hard to read. I haven't really tried Kotlin yet, but my impression is that…

Kotlin's main improvement on Java is its seamless integration with the most popular IDE on the JVM. Of course, it helps that IntelliJ and Kotlin are put out by the same company, but Jetbrains did emphasize when they first announced Kotlin that its integration with IntelliJ would be top priority. Groovy and Scala never had this improvement.

Yet, Scala has much better and broader IDE support than Kotlin these days. There is first-class support in IntelliJ IDEA, Eclipse and VS-Code, and with advent of Scala 3 the IDE story is going to be even better with full LSP support, so any IDE or editor could get accurate type-aware highlighting and autocomplete for virtually free.

Kotlin has good support only in IDEA and JetBrains said they wouldn't support other IDEs. They seem to make exactly the same mistake as Scala 2 did with supporting only one IDE initially (Eclipse).

Re: Kotlin is now Google’s preferred language for Android app development

#93
post #84

Earlier quoted context omitted.

> Kotlin is rising in popularity because it's turning out to be the better Java that Groovy and Scala weren't. I'd say Kotlin is rising in popularity mainly because it's a Java alternative backed up by Google.

The rise-and-fall adoption of Scala and Apache Groovy is because their whole rationale for existing was to be a better something. Groovy (2003) tried to be a better Beanshell (1998) by adding closures to it. Beanshell tried to be a better Java (1995) by adding dynamic typing to it. Scala (2003) tried to be a better Java by adding definable operators to it. But when something even better comes along, their rationale f…

> Scala (2003) tried to be a better Java by adding definable operators to it.

That's totally wrong. The reason d'etre of Scala is merging FP and OOP in a simple and elegant way. And actually there was no "fall" in rise-and-fall adoption of Scala. The adoption is growing.

Re: Kotlin is now Google’s preferred language for Android app development

#94
post #34

Earlier quoted context omitted.

Kotlin on Android ultimately runs on Google's ART, not a JVM implementation, think MS J++. Also JetBrains is betting on moving Kotlin beyond the JVM, to all platforms it can reach. The latest version of kotlinc is now built with Kotlin/Native.

Which one reason if I'd chose a JVM language I'd go with Kotlin and no longer Scala. The JetBrains people understand and care deeply about developers. Scala compilation of my current project takes ages with the newest Scala/SBT on an iMac Pro 16 core / 32 gb. I have a side project in Go, compilation, startup and execution is so fast that you don't think it's compiling at all. I wish language designers would use a fas…

The performance difference between Scala compiler and Kotlin compiler is not as huge as advertised by Kotlin promoters:

https://stackoverflow.com/questions/34615947/why-does-kotlin...

Also worth noting that that answer is quite old and Scala compiler got over 2x faster since that time and now has a much improved incremental compiler, so it may be on par with Kotlin, which added more features since that time and got slower. So both languages seem to be in the same league.

There are many people complaining on Kotlin's performance as well:

https://discuss.kotlinlang.org/t/kotlin-compile-so-slowly/16...

Of course there are Scala idioms that can yield poor compile times, like code using implicits or macros a lot, but Kotlin doesn't even have these features, so instead you'd have to write lot of additional boilerplate code by hand. How can we call writing code by hand fast vs not writing code at all? That's comparing apples and oranges.

Re: Kotlin is now Google’s preferred language for Android app development

#95
post #52

Earlier quoted context omitted.

Which one reason if I'd chose a JVM language I'd go with Kotlin and no longer Scala. The JetBrains people understand and care deeply about developers. Scala compilation of my current project takes ages with the newest Scala/SBT on an iMac Pro 16 core / 32 gb. I have a side project in Go, compilation, startup and execution is so fast that you don't think it's compiling at all. I wish language designers would use a fas…

Hopefully dotty solves some of those problems. Compared to Scala, I personally find Kotlin inexpressive and ugly.

Recent 2.12 and 2.13 are plenty fast. Incremental compilation on the project I do takes about 1-3 seconds for me from hitting run to running the unit test after modifying the code. I get similar times in Kotlin.

Re: Kotlin is now Google’s preferred language for Android app development

#96
post #91

Earlier quoted context omitted.

Kotlin's main improvement on Java is its seamless integration with the most popular IDE on the JVM. Of course, it helps that IntelliJ and Kotlin are put out by the same company, but Jetbrains did emphasize when they first announced Kotlin that its integration with IntelliJ would be top priority. Groovy and Scala never had this improvement.

Yet, Scala has much better and broader IDE support than Kotlin these days. There is first-class support in IntelliJ IDEA, Eclipse and VS-Code, and with advent of Scala 3 the IDE story is going to be even better with full LSP support, so any IDE or editor could get accurate type-aware highlighting and autocomplete for virtually free. Kotlin has good support only in IDEA and JetBrains said they wouldn't support other I…

If that's true, then Kotlin is successful despite its lesser IDE support.

Re: Kotlin is now Google’s preferred language for Android app development

#97
post #91
post #87

Earlier quoted context omitted.

I think it's not just that Groovy and Scala were temporarily a better Java that was eventually overtaken by the next even better Java, I think they were not sufficiently better. Better at some things, but with a cost not everybody wanted to pay. Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex and occasionally hard to read. I haven't really tried Kotlin yet, but my impression is that…

Kotlin's main improvement on Java is its seamless integration with the most popular IDE on the JVM. Of course, it helps that IntelliJ and Kotlin are put out by the same company, but Jetbrains did emphasize when they first announced Kotlin that its integration with IntelliJ would be top priority. Groovy and Scala never had this improvement.

> Kotlin's main improvement on Java is its seamless integration with the most popular IDE on the JVM.

Did Java not have seamless integration? I thought several IDEs (Eclipse, Netbeans and IntelliJ) were designed specifically around Java.

Re: Kotlin is now Google’s preferred language for Android app development

#98
post #9

...great, Kotlin for Android, Dart for Flutter, on the ML side they're starting to adopt Swift, for networking infra code Go. What the heck is with this "tower of babel"?! Are other people not bothered by the overlapping features of all these languages? At this point I thin most would prefer a slightly-frankensteinian monster-language that you'd get by taking either Kotlin or Swift and bolting all the other features…

Yep. Swift is open-source and pretty decent. Google should clean house and go with the language that would attract the most developers.

1. Why would swift attract most developers?? It's a fairly small language outside the iOS bubble.

2. Google has invested tons of money in 3 different languages and each works _extremely_ well in it's intended domain.

3. Even as open source, remember Apple has a history of crippling software on competing platforms.

Re: Kotlin is now Google’s preferred language for Android app development

#99
post #96

Earlier quoted context omitted.

Yet, Scala has much better and broader IDE support than Kotlin these days. There is first-class support in IntelliJ IDEA, Eclipse and VS-Code, and with advent of Scala 3 the IDE story is going to be even better with full LSP support, so any IDE or editor could get accurate type-aware highlighting and autocomplete for virtually free. Kotlin has good support only in IDEA and JetBrains said they wouldn't support other I…

If that's true, then Kotlin is successful despite its lesser IDE support.

Main reason for Kotlin uptake is Android. Kotlin is successful due to smaller footprint of its runtime lib and just-slightly-better Java philosophy, because it uses Java collections instead of bringing its own like Scala did. A big runtime library and problems caused by high method count hitting limits of Android runtime slowed down adoption of Scala on Android and allowed Kotlin to take that niche. Later the official support from Google reinforced its position.
Post reply on HN