News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by biztos on Tuesday October 25, 2022 @09:50AM (#33330428)
I’m not a Kotlin user, but this struck me as ambitious:

> having the entire Java ecosystem available

and, in the same point:

> Compilation for so many platforms, directly to native executables

Does this mean you can compile pretty much any Java libraries to non-JVM executables?

Re:From zero to 10M lines of Kotlin by MrPowerGamerBR on Tuesday October 25, 2022 @09:55AM (#33330491)
No, if you are targeting a different platform you can't use JVM libraries.

If you your target is JavaScript, you can use JavaScript dependencies (sort of: they won't have any type bindings so you will need to code then yourself) but you can't use any JVM libraries on it.

Re:From zero to 10M lines of Kotlin by slively on Tuesday October 25, 2022 @09:55AM (#33330501)
No, if you use Kotlin native you do not get access to Java libs.
Re:From zero to 10M lines of Kotlin by ohgodplsno on Tuesday October 25, 2022 @10:05AM (#33330607)
As other said, yep, you do not get the Java ecosystem if your target is native executables (or JS). there are alternatives like kotlinx-datetime, kotlinx-serialization, the kotlin stdlib. However, if you know you're going to stay on a JVMable target, feel free to not use Kotlin/Multiplatform, but regular JVM Kotlin libraries