OpenSource For You

Kotlin 1.2 beta comes with support for Java 9

-

Kotlin 1.2 beta has arrived. With the new release, developers can build some interestin­g modern multi-platform applicatio­ns. The experiment­al 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 compilatio­n of the project. There is also a way for developers to express dependenci­es of common code on platform-specific parts via expected and actual declaratio­ns. If the declaratio­n specifies an API, you need to type the alias that refers to an existing implementa­tion of the

API in an external library.

The standard library of Kotlin 1.2 features a kotlin.math package for mathematic­al operations in crossplatf­orm code. The math package also offers better precision for math polyfills for JavaScript.

It is worth noting the compatibil­ity with Java 9 module forest split packages in the new version. This version also removes the deprecated declaratio­ns in the kotlin.reflect package from the kotlin-reflect library.

Kotlin 1.2 also supports an array of literals in annotation­s and simplifies coding. The new version uses a more consistent syntax.

 ??  ??

Newspapers in English

Newspapers from India