Why Choose Kotlin for Android Development

Kotlin announced as official language for Android development at last year Google I/O . And now, Kotlin development is now supported by Android Studio 3, the default Android development IDE. If you still can choose between Java or Kotlin to develop your application.

For about more than 5 years, Kotlin has become more mature. It’s gone through 1.0 stage. And yet you can adopt it completely into apps. So you can have an app that has Java and Kotlin code completely integrated.

I started to learn Kotlin on Android over Java. Java language has been my first language to make a mobile app. I love it. Kotlin is new language for me. There are some tutorial out there to start than a year ago. So why you should also learning Kotlin?

Here is the list I gather from various sources and also in my experiences using Kotlin:

  1. Easy to setup
    Android Studio 3 by default has support for Kotlin. When you start a new project, you need to check this option if you want to write your project using Kotlin.
  2. It’s interopable with Java
    You can still use Java code along with Kotlin.
  3. No more null pointer exceptions
    Also known as ‘the billion dollar mistake’, null references are the bane of Java developers and are responsible for more crashes on Android than pretty much any other error. Kotlin seeks to make this a thing of the past in all but a few cases with “null safety”. Just one more way that it streamlines development!
  4. No semi-colons
    You do not need to worry again if you miss to place a semi-colon at the end of a line when you write in Java. But in Kotlin, it doesn’t matter anymore.
  5. No overhead
    Writing app in Kotlin versus Java will not add any overhead; your app will be no slower and larger than it would be otherwise. Kotlin’s library is small and can run natively in Java environment, just like Java.
  6. Already has good support
    The newest Android Studio 3 now supports Kotlin built in it. Although still new but many developer and community have already using. Nowadays, there are many tutorial out there.
See also  How to Change Package Name in Android Studio

So why not to try and learn a new language, and have fun with it. Happy coding!

About wahyuway

Check Also

Cannot Launch Android Emulator

Android Emulator is useful when you want to debug locally inside your environment. We can …

Leave a Reply