One of the great things about targeting the JVM is the sophisticated OO ABI it provides, which stands in contrast to what you get in the C or C++ worlds. However, this great inheritance is slowly rotting away, as Java fails to keep up with language innovation.
The obvious fix is for the makers of Kotlin, Scala, Ceylon and perhaps other languages to get together and hammer out specifications for how to compile simple features that they all already agree on. These would become a part of the JVM ecosystem ABI.
Initial targets that hopefully shouldn’t have much mismatch between languages would be:
- Arguments with default values/optional arguments
- Named arguments (this is already standardised by Java but I don’t know if Kotlin uses it)
- Companion objects/singletons
- Nullability annotations
A standardisation effort like this would allow e.g. Scala code to call Kotin methods that have optional arguments and vice-versa, to access each others companion objects and so on.
Is there any interest in doing this?