While Java is most popular language for android development. But android application can be written in any language that can compile and run on Java Virtual Machine (JVM). End user even can’t see the difference.
Kotlin is officially introduced in recent Google IO session. Switching to Kotlin programming language is a nice idea as Kotlin is much stronger language compare to Java in many areas.
There are 10 reason to use kotlin in android development over java –
Even though launching Java 8 was the great effort to make it a modern language but at the time of writing android only support a subset of Java 9 features. Java as a whole also has some pretty well-documented language issues, including endless try-catch blocks, a lack of extend ability, null-unsafety (and that infamous NullPointerException), not to mention a lack of support for functional programming features.
Kotlin strength is, it can work all alone and along with java as well. Open source content which are already written in Java can work with Kotlin with any problem
Being a modern object oriented programming language, Kotlin is very easy to learn. Java developer will find most syntax of Kotlin similar to Java.
So why should you have to choose between functional and procedural? Like many modern programming languages, Kotlin aims to bring you the best of both worlds by combining concepts and elements from both procedural and functional programming.
Kotlin is developed by JetBrains, the company behind IntelliJ—the IDE that Android Studio is based on. It’s obvious that Android Studio has excellent support for Kotlin. If you’ve installed the Kotlin plugin, Android Studio makes configuring Kotlin in your project simple.
Class written in Kotlin is more concise compare to code written in Java for same work. Kotlin is particularly good at reducing the amount of boilerplate code you need to write, which should make coding in Kotlin a much more enjoyable experience
The Kotlin Standard Library and runtime will increase the size of your .apk. While this only equates to around 800KB. But it will put extra 800KB on your apk current size.
Even though Kotlin seems much better than Java but lack of official support from Google can pile up your pain. On internet there is less help available on Kotlin. I would recommend to use Kotlin along with Java. There is no need of immediate transformation of your application to Kotlin as Google didn’t make it compulsory.
Keep learning and Keep commenting …….. Wish you Good luck