Are there any plans for Kotlin Native to be the “d...
# kotlin-native
k
Are there any plans for Kotlin Native to be the “default” Kotlin variant? As it then would be independent of the JVM and Oracle.
g
What is “default” variant?
a
Do you mean the compiler ?
Oracle? (openjdk 🙂 )
g
How Kotlin depends on Oracle? JVM is also not a proprietary technology of Oracle
a
Well K/N compiler requires a jdk installed but the exectuables are not
g
Not K/N itself, but compiler of K/N
a
What I said ment above ^
k
Default variant means that at the moment, if I am not mistaken, coroutines etc are written first for the JVM. The same is true for Collections where the Java ones are being used. Then this features are being “bridged” to K/N and KJS. I don’t know exactly how OpenJDK is being governed and who can decide how it will evolve but at the moment it seems to me that Oracle does this. So Kotlin, for example “has” to wait for JVM to get Values types, to be able to add structs e.t.c. .
1
d
If what you mean by "default" is the variant that somewhat controls the evolution of Kotlin... then no. Kotlin/Native won't be the "default" variant. As JetBrains aims to keep 100% Java interoperablity with every change in the language.
k
Yes I meant exactly that with the term “default”. Thank you.
g
JVM version has more focus just because it's the most popular platform. Actually coroutines available for js and native for a long time, very soon after java, but kotlinx.coroutines library is originally jvm. One of the reason for that that Java gas very powerful and mature concurrency and threading. JS is strictly single threaded and Native has very limited concurrency model for now
☝️ 1
1
t
I know everyone has a different use case but considering I find using Gradle to be the best way to compile K/N, and it uses Java, I can safely assume any system I want to compile on should have Java anyway
g
K/N itself written mostly on Java and to run compiler you need JRE (JDK?), so you need Java not only for Gradle but also for compiler