JetBrains is on a mission to bring Kotlin to all modern application components. The company just announced version 1.2 of the statically typed programming language for modern multiplatform applications.
Interest in Kotlin has been growing since Google announced it would support the language in its operating system Android. According to the company, the Android team has seen more than 17 percent of Android Studio projects use Kotlin since then.
The latest version of the language is available this week in the IntelliJ IDEA 2017.3 release as well as in older versions of IntelliJ IDEA and Android Studio.
Kotlin 1.2 is built to support multiplatform projects.”A multiplatform project allows you to build multiple tiers of your application – backend, frontend and Android app – from the same codebase. Such a project contains both common modules, which contain platform-independent code, as well as platform-specific modules, which contain code for a specific platform (JVM or JS) and can use platform-specific libraries. To call platform-specific code from a common module, you can specify expected declarations– declarations for which all platform-specific modules need to provide actual implementations,” Jemerov wrote.
The company is working on common libraries to move more logic to common code such as kotlin.test for writing tests, kotlinx.html for isomorphic rendering support, and kotlinx.serialization for marshaling Kotlin objects between different app tiers. It is important to note that multiplatform projects are still in the experimental phase.
The Kotlin team also spent a lot of time on the compilation performance of this release. According to the team, version 1.2 is about a 25 percent improvement over version 1.1, and the company expects that to increase with 1.2.x updates in the future.
Other features of this release include: improvements to the syntax for passing multiple arguments to an annotation, support for the lateinit modifier, smarter smart casts, improved type inference, new kotlin.math package, and new standard library functions.