Kotlin 1.7.20 advances K2 compiler

Kotlin 1.7.20 advances K2 compiler

Update to the popular JetBrains programming language for JVM, web, and native development also introduces a new operator for expressing open-ended ranges.

Credit: Dreamstime

JetBrains has published a beta of Kotln 1.7.20, a planned upgrade to the programming language that introduces an operator for creating open-ended ranges and includes more work on the high-performing K2 compiler, which is still in development.

A new ..< operator previewed in the beta enables creation of open-ended ranges. While Kotlin already has the .. operator to express a range of values, the ..< operator acts like the until function and helps with defining the open-ended range. 

Research has shown that the new operator does a better job at expressing open-ended ranges and making it clear that the upper bound is not included.

For the K2 compiler, which is in an alpha state, work continues on stabilisation, with support added for plugins including all-open, no-arg, and jvm-abi.gen, as well as Parcelize and AtomicFU. The alpha version of the compiler works only with JVM projects and does not support Kotlin/JS, Kotlin/Native, or other multi-platform projects.

The Kotlin 1.7.20 beta was published July 31. Directions on getting started with Kotlin can be found at

Other capabilities in Kotlin 1.7.20 include the introduction of generic inline classes as an experimental feature for the JVM. With this capability, the underlying type of JVM classes can be a type parameter.

Meanwhile, the new Kotlin/Native memory manager is enabled by default, with this release bringing further stability and performance improvements. The memory manager moves to a beta stage and paves the way to promoting Kotlin Multiplatform Mobile, an SDK for iOS and Android development, to beta as well. 

Previously, the older memory manager made writing concurrent, asynchronous code complicated and prevented adoption of the SDK because of concurrency limitations. The new memory manager overcomes these limitations.

Also, standard library API changes include new types and operations introduced in the kotlin.ranges packages.

The beta of Kotlin 1.7.20 was preceded by the release of Kotlin 1.7.0 in June.

Tags Kotlin


Brand Post

Selling to the CIO: Edge Computing

The key to selling Edge solutions to CIOs is demonstrating the value to the business, not concentrating on speeds and feeds, says Dell Technologies Brett Dunsmore.

Show Comments