JetBrains has released version 1.5.0 of its Kotlin programming language. The new version introduces, among others, support for JVM records and the new standard JVM IR compiler.
Version 1.5.0 is the first update according to the new six-monthly release schedule. Previously updates were only released when enough new features were available.
The new version has many features that were still in preview in version 1.4.30 now receiving the stable label. With support for JVM records, the language remains interoperable with the Record feature present in Java since version 15. This is a new way of indicating types within the programming language. Furthermore, Kotlin now supports sealed interfaces, another feature introduced with Java 15. This works similarly to the existing sealed classes.
The standard library has also been extended. New stable APIs have been released for unsigned integer types, supplemented with corresponding ranges, progressions and functions. In addition, the developers have added Extension functions for java.nio.file.Path. This makes it possible to use non-blocking Java IO in a Kotlin style.
Furthermore, the String and Char API has been improved. The API now includes changing strings and characters from upper case to lower case and vice versa and new functions to convert characters to integers or numeric values. Also, the Duration API has been extended to include a Long value.
The JVM IR compiler, which was announced in Kotlin 1.4.0, has now reached stable status. JetBrains is making the new compiler the standard right away. With the new compiler, performance should be better for users, while the Kotlin development team will find it easier to add new features.
Kotlin is a programming language that can run on different platforms, fully interoperable with Java. The language has attracted a lot of interest from Google, which has incorporated it into Jetpack Compose.