Kotlin 1.6.0 launches the memory manager

0

Kotlin 1.6.0, the latest version of JetBrains’ popular language for JVM, web and mobile development, has been released with a new memory manager for native development, still in the experimental phase.

The Memory Manager for Kotlin / Native, which compiles the code into native binaries, brings the language closer to a cohesive development experience. The memory manager lifts existing restrictions on sharing objects between threads and provides concurrent, leak-free programming primitives that are secure and do not require special handling or annotations.

The Memory Manager features a long list of features in Kotlin 1.6.0, which was described primarily as a stabilization release and released on November 16. Features previously considered experimental in Kotlin are now available by default in Kotlin 1.6.0. Installation instructions for the version are available at blog.jetbrains.com. Users of JetBrains IntelliJ Idea or Android Studio IDEs can update automatically.

Other features of Kotlin 1.6.0 include:

  • For Kotlin / Native, the LLVM dependency has been reworked, bringing the LLVM version to 11.1.0 with reduced dependency size and other benefits.
  • Sealed when The statements produce a compiler warning if a when statement is not exhaustive. This feature, now in a stable state after being previewed in Kotlin 1.5.30, makes code more secure without developers needing to introduce their own functions.
  • Support is stabilized for implementation suspend functional types as super interfaces. This was missing in the design of Kotlin’s coroutines. In addition, the conversion of normal functional types to suspended functional types is stabilized. Developers can now pass any expression of an appropriate regular functional type where suspend is expected as a parameter. The compiler will automatically perform the conversion. This feature fixes an inconsistency between normal and suspended features in Kotlin.
  • Compiler type inference for generic types has been improved.
  • typeof has been stabilized and can be used on any Kotlin platform. It had been available on the JVM on an experimental basis.
  • The Duration API has been stabilized.
  • For the standard library, the following stdlib functions have been promoted to stable: collection generators, bit rotation operators on integers, and the regex function to split a string into a sequence.
  • For standard input, new functions are planned for playback from the console.
  • The Kover Gradle plug-in, currently at the experimental stage, measures the coverage of Kotlin code built with the JVM compiler.
  • For Kotlin / JVM, the repeatable annotation capability is compatible with Java; @kotlin.annotation.Repeatable now accepts any retention and makes the annotation reproducible in both Kotlin and Java.
  • For Kotlin / JS, developers relying on a server without internet connectivity can disable the download of Node.js and Yarn for Kotlin / JS projects and use instances already in place on the host.

Copyright © 2021 IDG Communications, Inc.

Share.

Comments are closed.