Here's what's included in Kotlin 1.4.0:
- By default, a new, more powerful type inference algorithm is enabled. It automatically infers types in more cases, supports smart-casting even in complex scenarios, handles delegated properties better, and more.
- New IR backends for JVM and JS are available in alpha mode. After stabilization, they will be used by default.
There are a lot of new things in Kotlin 1.4:
- SAM transformations for Kotlin interfaces
- Explicit API mode for library authors
- Mixed named and positional arguments
- trailing comma
- Improvements for callable references
- Using break and continue inside when loops
Improvements to the standard library:
The main direction of work on the Kotlin standard library is to improve uniformity both across platforms and between the operations themselves. This release adds new features to the standard library. collection operators, delegated property enhancements, bidirectional ArrayDeque queue implementation ΠΈ more.
Also, no need to declare a dependency on stdlib anymore
in Gradle-Kotlin projects, whether you are developing for a single platform or creating a multi-platform project. As of Kotlin 1.4.0, this dependency is added by default.
Work continued on other parts of the Kotlin ecosystem:
- kotlinx.coroutines
- Library for serialization approaching maturity. Presented kotlinx.serialization in version 1.0.0-RC.
- Released a preview of the DateTime API, an experimental library kotlinx-datetime
We invite everyone to a four-day online conference dedicated to Kotlin 1.4!
The event will be broadcast October 12-15. Free registration via the link: https://kotlinlang.org/lp/event-14#registration
Source: linux.org.ru