Last week, Google announced official support for the Kotlin programming language on Android. Now, developers can write their apps in either Java or Kotlin.
Developers are excited about this news, but what does it mean for business owners? Is this a positive change—or a burden?
First things first: Kotlin is optional, and you can continue developing your Android app in Java, just as you always have. So why would you switch to Kotlin? We think there are a number of benefits.
Kotlin is a modern language that was created to improve some of the pain points that developers have learned over the many, many years of using Java and other languages.
This means that the language has many conveniences built in. Something that used to require hundreds of lines of code may now require just a few lines in Kotlin. Not all updates will be as drastic, but Kotlin does often allow you to do the same thing that you are currently doing in Java, but with less code.
And the less code your developers have to write, the better. Additional code takes more time to write, has a higher chance of bugs and requires more time to manage in the long run. In essence, Kotlin means less code and less code means fewer problems.
Kotlin helps reduce bugs in your code because it forces the developer to make certain decisions about their code as they write it.
In Java, many of these decisions are implicit, or default to the most permissive option. This means that those decisions are often an afterthought. Delaying these decisions can lead to crashes in your app—and you find out only after your app is in the hands of your users as they begin experimenting with it.
In contrast, Kotlin allows you to discover some of these issues as soon as the code is written. You will find and fix these kinds of issues before they end up affecting your users, ultimately leading to a better user experience, higher Play Store reviews and more downloads.
Kotlin works with Java, but it was designed to improve the experience developers have when writing their code. Because of its flexibility, you can start by converting a single file to the Kotlin language mid-project without having to rewrite the old Java code, meaning that you don’t have to switch everything over, at least not immediately.
That being said, the transition to Kotlin should be fairly easy for developers since it is a comfortable transition for people who already know Java. And once the language is learned, it’s bound to save time and headaches, ultimately freeing developers to improve current projects, create additional projects and experiment with the ever-growing Internet of Things across Google’s array of platforms.
Google values developer feedback; official support for Kotlin is here because the community demanded it. Android developers at prominent companies like Basecamp and Pinterest have already switched over to Kotlin and have seen benefits in their projects. As more and more companies make the leap, you can expect to see Google (and the entire Android community) continue to promote Kotlin and place less emphasis on Java.
All of this means that now is the time to plan for Kotlin. While Google is unlikely to completely drop support for Java in the near future, Kotlin is here and will quickly become the preferred language going forward.
Ready to get started with the transition? We’ve been writing code in Kotlin for years, and we have the expertise to help your team embrace this change. If you’d like to learn more about Kotlin, contact our sales team for more information on how we can help you move your business forward into this new era of Android development.
Learn more about what Kotlin means for your Android apps. Download our ebook for a deeper look into how this new first-party language will affect your business.
Interested in learning more about our basic and advanced Android Courses?
Learn from the experts at a Big Nerd Ranch Bootcamp!
Interested in leveling up your coding skills from the same authors of the Big Nerd Ranch Guide? Subscribe to The Frontier today!
Guest Allan Caine