Hacker News new | ask | show | jobs
by jurgenkesker 530 days ago
I enjoy Rust, but have settled on Kotlin for my language of joy. I use it in my day job for Android, but also recently started converting personal project backends and APIs to it (mainly from Ruby). I really like the ease and joy Kotlin gives me, and if I need a very high performance or very low level project/library, I'll write it in Rust. Rust is too slow for me (when coding), so a bit too low level I guess. In Kotlin I can express everything I want.
3 comments

Two things concern me about Kotlin:

1. The language and its future are heavily intertwined with JetBrains and their motivations. It's difficult to say whether this is a good thing or bad, but issues like the one discussed at https://discuss.kotlinlang.org/t/any-plan-for-supporting-lan... don't inspire confidence.

2. Java seems to be moving ahead at a rapid pace and is slowly absorbing many of the features that once distinguished Kotlin. This makes it difficult to jusify introducin Kotlin at a company where Java is heavily used.

> I enjoy Rust, but have settled on Kotlin for my language of joy.

Isn't it comparing apples and oranges? Is there any good reason to use Rust if you can live with a GC?

The whole premise of this article is non-performance reasons to love rust
Yeah, like startup time and (cross-)compiling to a static binary. Although the compile time can get annoying.
What feature do you use Kotlin for that does not exist in modern Java (21+)?
Complete by-default null safety is a big point, extension functions are just nice, smart casts, proper data classes and operator overloading, and simple expressive functional stuff like range syntax and reified generic types for inline functions. In general the Kotlin language feels more usable, yet less bloated (wrt the actual code, not the features ofc).
Those are actually very good features. I guess null safety will come to Java with project Valhalla.