I am not sure if anyone brought Kotlin into question, but it still supports Java 8 as the minimum version, and also, if you specify a higher JDK, it starts introducing optimizations specific for that JDK version.
So Kotlin can interop with Java 17 features, such as sealed interfaces and Java records by just specifying the Java version in the build — i.e., it can generate record classes, it can work with Java’s sealed
types, and its own sealed
types can be generated using specific Java bytecode such that they are recognized as sealed
types in Java as well.
Here are some links:
- Using Java records in Kotlin | Kotlin Documentation
- Sealed interfaces and sealed classes freedom · Issue #226 · Kotlin/KEEP · GitHub
Important to note that Kotlin has the burden of Android compatibility, with Scala having unburdened itself of Android since 2.12.