Kotlin 1.2 beta comes with support for Java 9
Kotlin 1.2 beta has arrived. With the new release, developers can build some interesting modern multi-platform applications. The experimental multi-platform
projects option lets developers reuse code between JVM and JavaScript, for which the code is first placed in a common module.
In addition to the option to reuse code, Kotlin 1.2 beta produces the code for both common and platform-specific parts during the compilation of the project. There is also a way for developers to express dependencies of common code on platform-specific parts via expected and actual declarations. If the declaration specifies an API, you need to type the alias that refers to an existing implementation of the
API in an external library.
The standard library of Kotlin 1.2 features a kotlin.math package for mathematical operations in crossplatform code. The math package also offers better precision for math polyfills for JavaScript.
It is worth noting the compatibility with Java 9 module forest split packages in the new version. This version also removes the deprecated declarations in the kotlin.reflect package from the kotlin-reflect library.
Kotlin 1.2 also supports an array of literals in annotations and simplifies coding. The new version uses a more consistent syntax.