Back to top
The Case for Kotlin

As a mobile-first dev shop, we stay on top of the trends, platform changes, and new facets of our industry. In the past few years, a language has emerged that makes Android development more fun for the developer, and which will live in harmony within the Java-based platform. In May 2017, Google announced that it would officially support the use of Kotlin for Android development! We’re pretty excited about this, but what does it mean for you and your app?

What is Kotlin?

Kotlin is a modern programming language for building Android applications. Compared to Java, Kotlin boosts product stability and developer productivity by making it easier to write robust and expressive code quickly.

Biggest Wins

  • Product stability. All apps encounter unexpected data. Unlike Java, Kotlin forces developers to actively, rather than passively, make decisions about how to handle these situations. This results in fewer bugs, fewer crashes, and happier customers.
  • Developer productivity. Kotlin leverages modern tools and techniques to allow developers to express themselves more concisely than in Java. This results in fewer keystrokes, fewer opportunities for errors, and a faster rate of development.
  • Similarity to Apple’s Swift. Kotlin and Swift (iOS) are based on extremely similar principles and share a lot of syntax. Using these two languages within Detroit Labs makes it easier for our Android and iOS developers to collaborate when building applications and share their solutions. This results in improved logical consistency between the two applications without sacrificing the other benefits associated with native development.

What about…

  • …my existing Android application written in Java? Java and Kotlin code can coexist in an application quite happily. In general, we recommend writing new code in Kotlin so that you enjoy the benefits we described above. Converting legacy Java code to Kotlin is relatively easy but entirely optional.
  • …project velocity? Won’t developers be slower while learning Kotlin? Not significantly. There may be a slight dip in velocity for a couple of weeks, but once those developers are ramped up, the speed increases offered by Kotlin will recoup the time invested in learning.

Where can I learn more?