Kotlin 1.4 will arrive in 2020: How will it improve multiplatform?
Kotlin is enjoying its moment in the sun as it grows in the Android dev ecosystem. But what does the future hold? Recently, JetBrains discussed the future of the language and what we can expect in Kotlin 1.4 and beyond. As the annual KotlinConf wraps up, let’s look towards the future and see what improvements we can expect to arrive and what its current goals are.
The annual KotlinConf ends on December 6, after three days of informative sessions, interviews, and workshops. Sessions covered a wide range of topics including coroutines, building PWAs, asynchronous programming, and shipping mobile apps.
Kotlin continues giving Java a run for its money, as it fixes a number of issues that Java has (such as proper function types, for instance) and is overall a bit more concise. However, it also shares some of the same issues that plague Java. While Kotlin is excelling in the Android stack, many users feel it still isn’t fully mature as a frontend language.
The language is still fairly new, so let’s take a look towards the future of the language and see what to expect in versions 1.4 and beyond as Kotlin grows more mature.
A blog post from JetBrains announces:
Our vision is for Kotlin to be a reliable companion for all your endeavors, a default language choice for your tasks. To accomplish this, we’re going to make it shine on all platforms. Multiple case studies from companies well-known in the industry show that we are making good progress in this direction.
As for multiplatform support, it exists as an experimental feature in the current version of Kotlin, though it is described as an “explicit goal” for the language’s future. Kotlin’s development team is working hard on bringing us closer to full multiplatform functionality.
Currently, JetBrains is developing a plugin for Android Studio that can run, test, and debug Kotlin code on iOS devices.
Kotlin 1.4 changes
According to JetBrains, Kotlin 1.4 is expected to arrive in spring 2020. It will not contain any large changes; instead, 1.4 will focus on improving the language’s overall experience.
So far, here is what JetBrains revealed.
- Support for SAM conversions
- Trailing commas
- Fixed mixed naming and positional arguments
lazyproperty and other delegated properties
typeoffunction and multiplatform support
A number of new minor improvements are also on the agenda. These include:
Speedier compilation times
One of the downsides of Kotlin for many programmers is its fairly long build times. However, you can expect improved times in your programming future.
Already available in Kotlin 1.3.60, Gradle Import in Android Studio received a speed boost and is now 2.5 times as fast, with less peak memory usage during import.
A new compiler is in the works, which aims to unify all Kotlin platforms. JetBrains remarks that this is a “multi-year effort”, so it will take some time to finish. However, once it releases, it will become the new default compiler.
New library format
KLib, a new library distribution format, will help the language achieve its multiplatform goals. With KLib, you will be able to build a multiplatform library. KLib libraries will include serialized IR code.
This feature will be experimental in Kotlin 1.4 and become stable in the future.
This isn’t all. JetBrains has been busy; be sure to read their blog detailing what else to expect in Kotlin’s future.