Kotlin 1.5.0 arrives with JVM records, sealed interfaces
Kotlin 1.5.0, the latest upgrade to JetBrains’ statically typed language, is now available in a production release. Highlights include stable support for JVM records and sealed interfaces.JVM records support in Kotlin 1.5.0 maintains interoperability with the latest Java records feature. Records are classes that act as transparent carriers for immutable data, with records acting as nominal tuples. [ Also on InfoWorld: JDK 16: The new features in Java 16 ] To support sealed interfaces, Kotlin 1.5.0 introduces the sealed modifier, which works on interfaces the same as it works on classes, with all implementations of a sealed interface known at compile time.To read this article in full, please click here
Kotlin 1.5.0, the latest upgrade to JetBrains’ statically typed language, is now available in a production release. Highlights include stable support for JVM records and sealed interfaces.
JVM records support in Kotlin 1.5.0 maintains interoperability with the latest Java records feature. Records are classes that act as transparent carriers for immutable data, with records acting as nominal tuples.
To support sealed interfaces, Kotlin 1.5.0 introduces the sealed
modifier, which works on interfaces the same as it works on classes, with all implementations of a sealed interface known at compile time.