De-Structuring in Kotlin
·5 mins
Recently I wrote an article about de-structuring in TypeScript, and hinted that Kotlin has a similar feature, but in more of a “strongly typed” language style.
Kotlin has an annotation called @JvmDefault
which, like most of the “Jvm” prefixed annotations, exists to help massage the Kotlin compiler output to match Java classes in a certain way. This annotation was added in 1.2.40, and has now seen some experimental enhancements in 1.2.50, so it seems worth exploring what this is all about.