2 ms·
The JVM has all the machinery required to do this right, though: invokedynamic. Kotlin provides named arguments and a copy method on data classes/records that
by thu2111 7y ago
The JVM has all the machinery required to do this right, though: invokedynamic.
Kotlin provides named arguments and a copy method on data classes/records that uses them. You do indeed have binary compatibility issues with them, but it's not a fundamental problem. It's just that it sits at the intersection of:
- Problems that only affect library writers, rarely a high priority for language designers (Java being a exception)
- Obscure JVM knowledge and new techniques
- Poor Android JVM holding back the ecosystem by discouraging any bytecode techniques that post-date Java circa 2010.