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. 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.
More InformationRelated ArticlesJetBrains 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.
Comments
or email your comment to: comments@i-programmer.info <ASIN:1871962544> <ASIN:1871962706> |
Last Updated ( Wednesday, 07 December 2022 ) |