* Nullsafe typing.
* Nullsafe typing!
* Inline extension functions for existing APIs. These are supremely useful. You can write features like locking and unlocking around a block, or try-with-resources in a one-liner, without compromising performance.
* (Nested) When statements, if-else as expression etc.
* Reified generics. You can actually write: "if (xy is T)" or use T::class
* Nullsafe typing
* Data classes
* Getter/Setter syntax as property and indexing syntax.
* Only unchecked exceptions
Kotlin really is Java 2.0.
But on a serious note it’s far too complex of a decision that includes your personal situation. I have a mixed codebase of Java and Kotlin and I tend to prefer Java now. I do use Kotlin’s Data classes a lot though. That’s my favorite feauture of the language.
All in all you could use a Kotlin data class just like you'd use a Java record, but it gives you much more flexibility like inheritance and mutable fields.