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


OpenAI Releases Swarm
25/10/2024

OpenAI has released an experimental educational framework for exploring ergonomic, lightweight multi-agent orchestration. Swarm is managed by the OpenAI Solution team, but is not intended to be used i [ ... ]



Google Updates Responsible AI Toolkit
01/11/2024

Google has announced updates to the Responsible Generative AI Toolkit to enable it to be used with any LLM model. The Responsible GenAI Toolkit provides resources to design, build, and evaluate open A [ ... ]


More News

espbook

 

Comments




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

<ASIN:1871962544>

<ASIN:1871962706>

Last Updated ( Wednesday, 07 December 2022 )