Native and multiplatform Kotlin

JetBrains continues to work toward Kotlin becoming a more ubiquitous language, and a big part of that effort is in Kotlin/Native. Kotlin/Native enables developers to write Kotlin code that is compiled to native binaries. This enables Kotlin to be run on platforms such as iOS, macOS, Windows, and so on.

Kotlin/Native retains its great interoperability and can be used to integrate with other languages such as C++ or Objective-C. This allows Kotlin to be used in multiplatform projects where common functionality is written in Kotlin and then shared between other targets. A great example of this is in mobile development where Kotlin code can be shared between iOS and Android applications.

In Chapter 15Introducing Multiplatform Kotlin, you'll learn more about how Kotlin/Native and multiplatform projects can bring your Kotlin code to additional platforms.

Having an understanding of these concepts, let's now understand some best practices with Kotlin in mind.