logoalt Hacker News

jayd16 • today at 5:46 PM • 2 replies • view on HN

Uhm, Kotlin does compile to native without the JVM doesn't it? It runs in the JVM for Java interop, no?

https://kotlinlang.org/docs/native-overview.html


Replies

pjmlp • today at 6:02 PM

Nope, the JVM is the main platform, and also used for Android development, which by the way, still mostly uses Android Java on the platform code.

Kotlin Native came later, its memory model was incompatible with Java, thus breaking portability for libraries between JVM and Kotlin Native, thus Jet Brains had to reboot Kotlin Native memory model.

https://blog.jetbrains.com/kotlin/2021/05/kotlin-native-memo...

Currently it is mostly used to port Android code into iOS apps, hardly something that even JetBrains could show off running their IDEs on top off, nah, they still need the JVM.

dathanb82 • today at 5:52 PM

Pretty sure it’s the other way around: Kotlin was implemented on the JVM and that’s its primary target, and got a native implementation later for folks that don’t want to run a JVM.

➕ show 1 reply