JetBrains has launched Kotlin 1.7.0, which includes an alpha version of the game-changing K2 compiler and is intended for JVM, web, and mobile development.
K2 aims to speed up the development of new language features, unify the platforms that Kotlin supports, and provide an API for compiler modifications and boost performance. However, the alpha version is limited to JVM projects. There are currently no compiler plugins that operate with it, except the kapt annotation processor plugin.
The Kotlin language website has instructions for getting started with Kotlin. Other features of Kotlin 1.7.0 include:
Types that are unquestionably non-nullable have been elevated to stable status. When expanding generic Java classes and interfaces, these allow for more compatibility.
If a regular type inference cannot acquire enough information about a type without using the -Xenable-builder-inference compiler option introduced in Kotlin 1.6.0 last November, builder inference is automatically active.
The opt-in requirements are now stable, and no additional compiler setting is required.
When other types are supplied, the underscore operator for type args can be used to infer an argument type.
It is possible to delegate implementation to an inlined value of an inline class. In most circumstances, developers can now construct lightweight wrappers that do not allocate RAM.
Kotlin 1.7.0 was released as a beta version in May. April saw the release of Kotlin 1.6.20.
For our team’s latest technological insights and news, visit – News insights and technology updates
News source: infoworld