Kotlin 1.7 Unveils New Compiler
Written by Mike James   
Thursday, 16 June 2022

Kotlin 1.7 has been released, with the inclusion of the alpha version of the new Kotlin/JVM K2 compiler. The new release also stabilizes language features, and offers performance improvements for the JVM, JS, and Native platforms.

Kotlin is the open source language originated by JetBrains and promoted by Google as a first class language for Android to replace or supplement Java. It makes Android programming easier by reducing the need for long chunks of boilerplate code that the average programmer just doesn't get or, perhaps more accurately, doesn't bother understanding at a deep level.

kotlinlogo

The headline improvement to the new release is the inclusion of the alpha version of the new Kotlin К2 compiler. This is described as offering serious performance improvements, but at the moment it is available only for the JVM, and none of the compiler plugins, including kapt, work with it yet.

The next change of note is to the incremental compilation in Gradle. Incremental compilation is now also supported for changes made inside dependent non-Kotlin modules and is compatible with Gradle.

Other improvements to this release include stable opt-in requirement annotations. Definitely non-nullable types have been promoted to Stable, and are recommended as they provide better interoperability when extending generic Java classes and interfaces.

Builder inference is also stable. This is a special kind of type inference that can be useful when calling generic builder functions as it helps the compiler infer the type arguments of a call using the type information about other calls inside its lambda argument.

Elsewhere, there's a new underscore operator for type args that can be used to automatically infer a type of argument when other types are specified; and you can now Implement by delegation to an inlined value of an inline class.

Kotlin 1.7 is available now.

 

 

 

kotlinlogo

More Information

Kotlin Home Page

Related Articles

JetBrains Announces Kotlin 1.6 

Kotlin 1.5 - Mature But Still Growing

Why Do Android Devs Convert To Kotlin?

Kotlin Versus Java - A Developer's Rosetta Stone

Kotlin Enters RedMonk's Top 20

Kotlin Gains A Foundation and A Portal

Kotlin Begins Its Takeover Of Android

New Kotlin Style Guides Unveiled

Kotlin - New Language For Android

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Google Clarifies ChromeOS Android Merger
21/07/2025

Is Google planning on merging ChromeOS with Android? Last week it looked like the long-standing rumor had been casually confirmed by a Google spokesperson. This week, we're back to a position of 'as y [ ... ]



Two Tools To Elevate Your MongoDB Experience
03/07/2025

The tools contradict each other; the first one allows you to write SQL instead of using Mongo's special syntax, while the other allows you to manipulate the database without having to write SQL a [ ... ]


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 07 December 2022 )