Kotlin, Official Support Announced for Android!!

Finally, an Android developer can say they have some official language to build Android apps. Google has announced official support for Kotlin programming language. We have been using Java for Android apps development ever since (except C++ in NDK) and also struggling to overcome Java issues we have been facing for years. No more fears of NullPointerExceptions!! Kotlin has come to our rescue.

What is Kotlin?

Kotlin is statically typed programming language designed to support multi-platform applications including Java virtual machine (JVM), browsers and Android apps. It runs on JVM. Kotlin was unveiled to the world in 2011 and its first stable version v1.0 was introduced in 2016 after years of development efforts.

Kotlin Features - Kotlin has really cool features.

  • Conciseness - You don’t have to write boilerplate code in Kotlin as it has pretty concise syntax.
  • Handling NullPointerExceptions - If you are afraid of unknown NullPointerExceptions, let this worry fade away with Kotlin as this programming language is much safe to avoid entire classes of errors.
  • Interoperable with other languages - If you are a Java developer or Android developer (where Java is used), Kotlin can be alternative for you as it is 100% interoperable with Java.
  • Tool-friendly - Kotlin is compatible with Java-based IDEs making it easy to switch to Kotlin.

Why Kotlin support for Android

During Google I/O 2017, Google announced official support for Kotlin programming language for Android development. As mentioned earlier, Kotlin is interoperable with Java, many developers were already using it for Android development and were hoping to get official support from Google. Kotlin has early adoption by many developers like Expedia, Flipboard, Pinterest, Square, and others. Kotlin is chosen for Android due to following facts -

  • 100% interoperable with Java. So you can use both Kotlin and Java in the same app
  • Easy to use making app development faster
  • No more NullPointerExceptions at runtime
  • Smart casting of variables
  • Destructuring declarations
  • Importantly supports Lambda functions

Kotlin is bundled with Android Studio 3.0. So you don’t have to worry about adding plugins for Kotlin. Just download Android Studio 3.0 (make sure you get canary version) and get started.

So if you are experienced Android developer, you don’t need to stop using Java immediately but definitely, need to learn Kotlin. If your knowledge lackluster Android development skills, no worries, you can still jump on Android development by starting Kotlin learning.