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


Python Is Everywhere - 2021 Survey Results
08/06/2022

The results of the 2021 Python Developers Survey, conducted as a collaborative effort between the Python Software Foundation and JetBrains have been published. We take a look.



Apache InLong Becomes Top Level Project
23/06/2022

Apache has announced InLong is now a top level project. InLong is a one-stop integration framework for massive data that provides automatic, secure, and reliable data transmission capabilities.


More News

pythondata

 



 

Comments




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