At the I / O 2019 Developer Conference, Google announced that the Kotlin programming language is now the preferred language for Android application developers — the new Jetpack APIs and libraries will be published first to Kotlin.
“If you start a new project, you should write it in Kotlin: the code written in Kotlin most often means for you (the developers) much less code — less code for typing, testing and maintenance,” Google says. According to the company, development for Android will increasingly become development on Kotlin.
Kotlin is a language created in 2010 by the international company JetBrains, which was founded by Petersburg programmers. For the first time, Google announced support for Kotlin in the Android Studio IDE in 2017.
According to Google, in two years the popularity of this programming language has grown significantly: more than 50% of professional Android developers use Kotlin in their projects. Kotlin became the fourth most popular programming language according to the latest survey of developers at Stack Overflow.
According to Google, in two years the popularity of this programming language has grown significantly: more than 50% of professional Android developers use Kotlin in their projects. Kotlin became the fourth most popular programming language according to the latest survey of developers at Stack Overflow.
Top comments (1)
This is increasingly true on the backend as well. E.g. Spring recommends using Kotlin and is adding co-routine support to Spring 5.2, making it the obvious choice to do asynchronous services. The difference with e.g. Scala and other JVM languages is that Kotlin is designed from the ground up to be a drop in replacement for Java. It's easy.
For example, the recent move of OkHttp to Kotlin is interesting since it is used a lot on both backend and Android. v4 was released a few weeks ago, is completely backwards compatible with v3 despite changing the implementation language from Java to Kotlin.
I've ported quite a bit of Java code over the last two years and it ends up being vastly improved with extremely low effort. I usually go class by class: run the automated conversion in intellij, fix the few errors, fix all the warnings and suggested improvements, change a few things to be more idiomatic Kotlin, run the tests, commit. Even very complex classes can be converted with a minimum of investment in time. The harder it is, the bigger the payoff because this usually indicates that there were some dodgy things happening. In my experience it's vastly easier than e.g. migrating js to ts, which I've also done a lot lately and which often ends up being quite hard due to a lack of automated tools and due to the fact that js can be quite messy.