|
|
|
|
|
by simon_void
814 days ago
|
|
not sure what "(non)-isomorphic" but Kotlin code is interoperable with Java code in both directions. You can easily call Java-code from Kotlin (but I guess that's the easy direction) but you can also call Kotlin code from Java. There exist specific annotations to control how Kotlin code will be converted to bytecode and therefore be invoked from Java, e.g. a function in a Kotlin companion object would normally concerted into a function of a Singleton property called INSTANCE on the base class, but if you annotate it with @JvmStatic it will become a static method of that class in bytecode instead.
This means you can write a Kotlin lib that feels very normal to call from Java.
here's the relevant part of the documentation: https://kotlinlang.org/docs/java-to-kotlin-interop.html
So yes, Kotlin is considered to be a successor language, not just another language (also) compiling to the JVM. |
|
Cpp2 isn't trying to be a successor language to C++, the article states that it's trying to present an identical feature set in a new skin where the best practices of modern C++ are more ergonomic without introducing any new functionality.