Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Kotlin/Native 0.8 recently released with safer concurrent programming

Save for later
  • 2 min read
  • 12 Jul 2018

article-image

Jetbrains have released a new version of their Kotlin/Native technology. With Kotlin/Native, you can compile Kotlin to native binaries that run without any virtual machine. It can also be used when a developer needs to produce a reasonably-sized self-contained program not requiring an additional runtime.

Kotlin/Native is now available in version 0.8 with the focus on safer concurrent programming, extending the stdlib functionality, and better iOS development support. The version also hosts numerous bug-fixes and performance optimizations. Let us take a look into each one in detail:

Better concurrency support


The version 0.8 improves concurrency support with the addition of shared immutable state and improved atomic values and references. Previously, Kotlin/Native applications kept the singleton object state local to a particular thread of execution. This helped in keeping the state of singleton objects on different threads non-synchronized. Now, the version 0.8 allows freezing on singleton objects. With this, developers now have a shared immutable state. A file will be read once per process execution, and is available to any thread or worker. Once published, the object is frozen, and cannot be modified anymore.

Library improvements in Kotlin/Native


Kotlin/Native has added performance improvements to the existing libraries. The standard library (kotlin.*) is standardized with other platforms using expect/actual mechanism and mostly matches other Kotlin flavors.

The standard random number generator and collection shuffling functions are now available, eliminating the need of platform-specific APIs to obtain random numbers.

Other JetBrains-provided libraries, like kotlinx.coroutines, kotlinx.serialization, and Ktor HTTP client will get experimental Kotlin/Native support. Developers can now write an iOS app and Android application sharing the same REST API-related logic.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at R$50/month. Cancel anytime

iOS support improvements


The version 0.8 fixes bugs that prevent publishing iOS apps to AppStore and solves framework initialization problems. It also adds support for 32-bit ARM iOS, so that older devices can be used with Kotlin/Native as well.

Binaries can be downloaded for macOS, Linux, and Windows. Visit the GitHub release page for additional information.

Forget C and Java. Learn Kotlin: the next universal programming language
Getting started with Kotlin programming
4 operator overloading techniques in Kotlin you need to know