2

Kotlin 1.6.20 arrives with better Java class interop

 2 years ago
source link: https://www.infoworld.com/article/3655959/kotlin-1620-arrives-with-better-java-class-interop.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Kotlin 1.6.20 arrives with better Java class interop

Latest update to the versatile language from JetBrains offers improvements for JVM, JavaScript, and native development.

By Paul Krill

Editor at Large,

InfoWorld | Apr 5, 2022 3:27 pm PDT

JetBrains has released Kotlin 1.6.20, a new release of the Kotlin language that features better interoperability with generic Java classes as well as faster build times. Some features cited in the release are still in preview form.

Improved interoperability with generic Java classes and interfaces was enabled through the inclusion of definitely non-nullable types, a feature currently in a beta stage. Kotlin 1.6.20 allows developers to mark a generic type parameter as definitely non-nullable using the new syntax, T & Any.

[ Also on InfoWorld: JDK 18: What’s new in Java 18 ]

To improve build times, an experimental JVM IR back-end mode compiles all files in a module in parallel. This can reduce compilation time by as much as 15%. There are restraints to parallel compilation, however. More JVM heap is required and the capability does not work with kapt. Also in Kotlin 1.6.20, Kotlin/JS (JavaScript) development with the IR compiler has been made more efficient with a new incremental compilation mode.

Kotlin 1.6.20 was released April 3. Installation instructions can be found on the Kotlin website. Other capabilities in Kotlin 1.6.20 include the following:

0 seconds of 21 minutes, 50 secondsVolume 0%
Loading ad
  • Kotlin/Native performance has been improved via updates and bug fixes to the LLVM IR generated by Kotlin.
  • Hierarchical structure support for multiplatform projects is enabled by default. This capability, introduced in Kotlin 1.4.0 in August 2020, improves code sharing in a project.
  • A prototype of context receivers for Kotlin/JVM offers new support for defining context-dependent declarations.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK