Why use Kotlin for Android development?
In accordance with Stack Overflow Developer Survey 2018, Kotlin is the 2nd most loved programming language and the 4th most wanted in the world.
Recently, TechBeacon digital platform included it in the list of 5 emerging languages with a bright future. In 2017, at Google I/O annual conference, Kotlin was announced as an official language for Android development.
Kotlin is a fully developed language
Unlike most programming languages, Kotlin has gone through the stringent development process with complete testing. It has been under development in both alpha and beta phase for years before officially released recently. Some companies started using Kotlin in their development even during the beta stage which shows the maturity of the language.
Easy to get started
Previously developers should make use of the plugin to add Kotlin to Android projects. With the release of Android Studio 3.0, Kotlin comes built in. You just need to enable Kotlin during the project setup. With Android Studio 3.0, you have a complete IDE supporting all the stages of development of Kotlin project.
Kotlin is lightweight
Another known alternative to Java for Android development is Scala which is too heavy. Scala is not only heavy, it also takes a long time to compile and the list of libraries and tools are limited. Kotlin compile times are highly similar to Java and in some cases relatively faster.
Kotlin is more stable
One of the most frequently reported problems with Java for Android development is Null Pointer Exceptions(NPE). Most of the app crashes were due to NPE. Unlike Java, Kotlin catches NPEs during compile time rather than runtime. As the exceptions are caught and handled by Kotlin during compilation, runtime errors are minimized and the crashes are prevented.
Kotlin is multi-platform
Kotlin was originally developed for JVM, but with the release of Kotlin JS you can develop apps and deploy across platforms like web, Android, etc.
Kotlin is easy to learn
Kotlin was developed by a company called JetBrains whose primary objective was to develop a programming language that is highly similar to Java. Java developers can learn and get acquainted with Kotlin in a limited period of time. Kotlin syntax is very easy to learn and only the advanced concepts take time to master.