alexsmail
alexsmail

Reputation: 5813

How Kotlin on JVM is planning to cope with new policy of Java releases?

AFAIK, Kotlin targets java 6 and java 8. Java 9 is out of their, any plan to target Java 9? I have even broader question. Now, Java will have new release every 6 month. What Kotlin is planning to do about it? What is expecting delay for Kotlin to target latest Java version.

UPD-1: My main concern is that Oracle started to actively remove features. For example, in Java 11 it is planned to remove JAX-WS and JAXB from JDK. So, it needs appropriate preparation from the Kotlin site. My question is what plan Jetbrain have for newer Java release.

Upvotes: 0

Views: 412

Answers (3)

hexkid
hexkid

Reputation: 594

Kotlin has no dependency on JAX-WS or JAXB and so doesn't need to make any changes to be compatible with Java 11.

I'm finding it hard to understand why you think that this will be an issue.

Upvotes: 0

Alexey Romanov
Alexey Romanov

Reputation: 170815

Kotlin targets Java 8 because that introduces major JVM changes which Kotlin can use (e.g. default methods in interfaces and invokedynamic changes which enable Java lambdas). Note that Kotlin doesn't have a separate Java 7 target; the only relevant-to-Kotlin changes there are in expanded standard library and they don't require changes in Kotlin itself, just an extra library. The same should apply to most new releases. I.e. there will maybe be kotlin-stdlib-jdk10/11 and not necessarily even that.

The next such change which is likely to happen is when Java adds value types and/or generics over primitives (which has no target version yet). While existing Kotlin versions probably won't be able to use value types (depending on the design), Kotlin does implement generics over primitive on the language level quite similarly to how it has non-abstract methods in interfaces.

Upvotes: 2

Cristan
Cristan

Reputation: 14115

any plan to target Java 9?

Kotlin has been compatible with Java 9 since version 1.2:

The Kotlin standard library is now fully compatible with the Java 9 module system, which forbids split packages (multiple jar files declaring classes in the same package). In order to support that, new artifacts kotlin-stdlib-jdk7 and kotlin-stdlib-jdk8 are introduced

source

Upvotes: 1

Related Questions