Kotlin 2.0 has been released with faster K2 compiler and enhanced features
JetBrains unveiled Kotlin 2.0 yesterday, the latest version of the Kotlin programming language. The update introduces the Kotlin K2 compiler along with a range of other enhancements.
Key features of Kotlin 2.0 include a new compose compiler Gradle plugin, lambda function generation using invokedynamic, and Kotlin/Native garbage collector (GC) performance monitoring with signposts on Apple platforms.
The release also stabilizes the kotlinx-metadata-jvm library and improves conflict resolution between Kotlin/Native and Objective-C methods. It also introduces support for named export in Kotlin/Wasm, and unsigned primitive types in functions with @JsExport in Kotlin/Wasm.
In addition, the Kotlin/Wasm toolchain now integrates the Binaryen tool for production compilation across all projects. Kotlin 2.0 further introduces a new Gradle DSL for compiler options in multiplatform projects, along with other enhancements and bug fixes.
For developers, Kotlin 2.0 support is included in the latest versions of the IntelliJ IDEA and Android Studio plugins.