Hacker News new | ask | show | jobs
by drampelt 2168 days ago
I've been exploring Kotlin as a "rule them all" language. With Kotlin native/multiplatform you can already cover all platforms today since it can compile to JVM, JS, and native code for iOS/macOS.

You still need to write the iOS/macOS UI in Swift but you can very easily have your data layer and business logic shared across platforms. I actually like that approach better than other cross-platform solutions since you keep the native platform UI.

1 comments

Very interesting, I will check it out!

Is there a Kotlin-first server-side framework that you can recommend? (I use Java/Spring at work and it's OK, but would prefer to try something else for my side projects)

Edit: if someone doesn't want JVM drama on their servers, how far can they get with Kotlin via LLVM?

I've been using https://ktor.io (by Jetbrains, same company behind Kotlin) but there are others like Micronaut and Quarkus. A few more options at: https://kotlinlang.org/lp/server-side/

As far as I'm aware there's no native server side framework available at the moment, but ktor could potentially support it in the future given the ktor client libraries work on native. You could also use GraalVM native image to build a JVM-free binary of your server, Quarkus has built-in support for it.