In the Google I/O 2017 keynote on the very first morning the biggest cheer of the session came when it was announced that Android is getting official support for Kotlin.
From now, Android Studio 3.0 ships with Kotlin out of the box. This makes it a lot easier and simpler for developers to use Kotlin for their projects. Previously plugins and extras were required to be installed to guarantee Kotlin compatibility with Android Studio.
Kotlin is a modern programming language that is designed to run on the Java Virtual Machine. Kotlin is designed with a large amount of interoperability with Java such that projects can contain both Kotlin and Java code and still be able to compile without any issues. The aim of Kotlin is to be an enhancement to Java and at the same time be intuitive and easy to read.
The official support for Kotlin does not mean that support for Java or C++ is ceased but it is an additional programming language. Google said that using Kotlin will make Android development faster than what it currently is. The big advantage of Kotlin is that it is designed by people in the industry and not academia. It thus solves issues faced by those programming at the coalface.
The learning curve for Kotlin is also apparently small and can be learned in only a few hours. For example many lines of Java code can be written with only a single line of code in Kotlin.
So why is the addition of Kotlin a good thing?
Java, in the version that is usually used in Android, contains a lot of historical baggage and issues. Many of these issues have been fixed in newer versions of Java but these versions are not practical for Android in most cases as it required the minimum SDK to be set to Android 24 (thereby ruling out a lot of users from using the app).
Kotlin is able to fill the gaps left by Java, while at the same time supporting everything that Java does. At the same time the code is more compact, easier to write, and easier to understand. Don’t forget that using Kotlin also allows the user to use much of the same code for both iOS and Android apps!
What about us?
Simpler code means faster code. Simple as that. Faster code means faster apps. Add in the faster development due its ease of use and it is a win-win for developers and users alike.
For those who want to try out Kotlin head over to their website and have a go. It was very obvious to us at Google I/O that the Googlers were very enamoured and excited with the prospect of using Kotlin. For this reason we expect it’s support and use within Android to grow in the coming months and years.