
Simplifying Application Development with Kotlin Multiplatform Mobile
By :

Kotlin is an object-oriented programming (OOP) language with many functional programming features. In this section, we'll go over its main features so that you have a basic understanding of how to express yourself in Kotlin later on. Throughout this chapter, we'll be comparing Kotlin to Swift in terms of these core concepts.
Having null references in code proved to be an underestimated factor of error proneness in older languages, such as Java and Objective-C (Obj-C), thus it has probably earned its billion-dollar mistake tag (https://en.wikipedia.org/wiki/Tony_Hoare#Apologies_and_retractions).
The purpose and solution are pretty much similar in Kotlin and Swift, with slight syntax and naming differences. They both aim to provide a type system that eliminates the danger of null references. Swift introduced optional types, which can be found as nullables in Kotlin.
Let's see some code in action, in order to...