News/Tech News

K2 compiler advances with Kotlin 1.7.20

Published on Oct 06, 2022

A new operator for expressing open-ended ranges has been added to JetBrains’ latest production release of its popular JVM, web, and native programming language.

As part of the ongoing development of the K2 compiler, JetBrains has released Kotlin 1.7.20, a planned upgrade to the programming language which introduces an operator for creating open-ended ranges.

A production version was unveiled on September 29. With Kotlin 1.7.20, a new ..< operator is available to create open-ended ranges. In addition to Kotlin’s .. operator to express a range of values, the ..< operator acts like the until function and helps with defining the open-ended range. Research has demonstrated that the new operator is more effective in expressing open-ended ranges and making it clear that the upper bound is not included.

A number of plugins are being added to the K2 compiler, which is currently in an alpha state, including all-open, no-arg, and jvm-abi.gen, as well as SAM (single abstract method) with receiver and AtomicFU. The alpha version of the compiler supports only JVM projects and does not support Kotlin/JS, Kotlin/Native, or other multi-platform projects.

Kotlin 1.7.20 beta was released on July 31. Kotlinlang.org provides instructions for getting started with Kotlin. Kotlin 1.7.20 offers the following capabilities:

As an experimental feature of the JVM, generic inline classes are introduced. By utilising this capability, the underlying type of JVM classes can be specified as a type parameter.

Kotlin/Native memory management is enabled by default, and this release provides additional performance and stability improvements. The memory manager has been promoted to beta status, setting the stage for the promotion of Kotlin Multiplatform Mobile, an SDK for iOS and Android development. Previous memory managers made writing concurrent, asynchronous code complex and prevented adoption of the SDK due to their concurrency limitations. These limitations have been overcome by the new memory manager.

A number of new types and operations have been introduced in the kotlin.ranges package that are part of the standard library API.

The release of Kotlin 1.7.20 follows the release of Kotlin 1.7.0 in June and Kotlin 1.7.10, a bug fix release, in July.

Tech News

JUnit

GraalVM Native Image Support in JUnit 5.9

A number of bugs have been fixed in JUnit 5.9, and a number of new features have been introduced, such as the ability to keep…

C & CPP

C/CPP deprecated in favor of Rust?

Originally released in March 2022, Spring Boot Migrator (SBM) was an experimental Spring project…

Our Latest Blog

Unlock Your Potential with a Level 5 Diploma in Business London's Top Courses img

Unlock Your Potential with a Level 5 Diploma in Business: London’s Top Courses

Are you looking to enhance your knowledge and skills in the field of business? Do...
Read More
Unlock Your Potential with Level 4 Diploma in Business Courses in London img

Unlock Your Potential with Level 4 Diploma in Business Courses in London

Are you looking for a comprehensive course to take your business career to the next...
Read More

Follow Us

Resources

Presentations
Browse LSET presentations to understand interesting…

Explore Now


eBooks
Get complete guides to empower yourself academically…

Explore Now


Infographics
Learn about information technology and business…

Explore Now