Kotlin 1.2 beta comes with sup­port for Java 9

OpenSource For You - - Fossbytes -

Kotlin 1.2 beta has ar­rived. With the new re­lease, devel­op­ers can build some in­ter­est­ing mod­ern multi-plat­form ap­pli­ca­tions. The ex­per­i­men­tal multi-plat­form

projects op­tion lets devel­op­ers re­use code be­tween JVM and JavaScript, for which the code is first placed in a com­mon mod­ule.

In ad­di­tion to the op­tion to re­use code, Kotlin 1.2 beta pro­duces the code for both com­mon and plat­form-spe­cific parts dur­ing the com­pi­la­tion of the project. There is also a way for devel­op­ers to ex­press de­pen­den­cies of com­mon code on plat­form-spe­cific parts via ex­pected and ac­tual dec­la­ra­tions. If the dec­la­ra­tion spec­i­fies an API, you need to type the alias that refers to an ex­ist­ing im­ple­men­ta­tion of the

API in an ex­ter­nal li­brary.

The stan­dard li­brary of Kotlin 1.2 fea­tures a kotlin.math pack­age for math­e­mat­i­cal op­er­a­tions in cross­plat­form code. The math pack­age also of­fers bet­ter pre­ci­sion for math poly­fills for JavaScript.

It is worth not­ing the com­pat­i­bil­ity with Java 9 mod­ule for­est split pack­ages in the new ver­sion. This ver­sion also re­moves the dep­re­cated dec­la­ra­tions in the kotlin.re­flect pack­age from the kotlin-re­flect li­brary.

Kotlin 1.2 also sup­ports an ar­ray of lit­er­als in an­no­ta­tions and sim­pli­fies cod­ing. The new ver­sion uses a more con­sis­tent syn­tax.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.