Does anyone know if there’s any plans yet for kotl...
# language-proposals
Does anyone know if there’s any plans yet for kotlin to introduce a type of value class (i know that keyword exists, but it’s for a single value inline class) that’s kind of like a data class, but without the backward compatibliity issues? Ideally it would follow the same rules (must have at least 1 val/var in the constructor, etc…) but generate only toString, equals and hashCode. And more importantly NOT generate the
and destructuring functions which can cause backward compatibility issues in libraries. I was pointed to the library by someone, but i’m reluctant to use compiler plugins if i don’t have to, due to the current lack of a stable api which leads these plugins to have to adapter to the ever evolving plugin api.
Regarding value classes specifically, you can read There are plans for multi-field value classes, tentatively slated for preview in 1.9.0 I believe
or this (yeah not that helpful based on your conditions)