Hey all, just wondering, why is kotlin stuck on Ja...
# getting-started
e
Hey all, just wondering, why is kotlin stuck on Java 8? Why doesn't it start targeting newer versions?
e
as far as the Java bytecode is concerned, there isn't actually much new. most of the new features have been in the Java language and API
the only new useful feature might be nestmates. https://youtrack.jetbrains.com/issue/KT-27182
Kotlin isn't even using invokedynamic from Java 8 yet, it would be useful for lambdas (https://youtrack.jetbrains.com/issue/KT-26060) and string concatenation (https://youtrack.jetbrains.com/issue/KT-21147)
the `@JvmDefault`/`-Xjvm-default` stuff is still getting settled (https://youtrack.jetbrains.com/issue/KT-25491, also a Java 8 feature)
project valhalla is much bigger than any of the above, but it isn't landed yet
I definitely do not speak for the K team, I'm just a user. but I do not see any strong reason to target newer Java versions yet.
m
Sometimes I do miss a standard library function that does not exist in Java 8 yet, but they could definitely target a newer version somewhere in the future
e
there's nothing stopping you from calling new Java APIs though? if you want to use the new
<http://java.net|java.net>.http
(for example), just go ahead and use it, no Kotlin support needed. that has nothing to do with the target version
m
yeah many people are still confusing che bytecode specification with the JDK…
m
That is true; I keep them conflated because sites like codewars only specify kotlin version, which use the java 8 api. For personal project I do use newer java versions