I've written a couple Android apps that use Java because that is my background . Other than Google wanting to phase out Java and force people to use Kotlin , is there a compelling reason to learn the language? My understanding is that Google created Kotlin because of an ongoing business dispute with Oracle .
From what I've read ,the performance issues with Android (as compared with IOS) have more to do with the fundamentals of the Android OS rather than the language that apps are written in. What I read said the Android performance issues had to do with Android treating all app threads with equal priority but IOS allows apps to have different thread priorities so IOS apps are more responsive. I could be wrong but that was my understanding of the article/post I read.
While your book is about a language ,it would be interesting to get your perspective on the Android OS performance issues as well .
Whether Google favors Kotlin over Java because of its series of lawsuits with Oracle is always a matter of some debate. That probably contributed, but I don't think that's the only or even the biggest reason. The developer community was already in the process of adopting Kotlin for Android development, mostly because:
* Null-safety is a highly valued feature of the language
* Kotlin has inline functions, which keeps the total function count down (a significant issue in larger Android apps)
* Kotlin does some optimizing on size and space
* Kotlin is produced by JetBrains, which is the same company behind both IntelliJ IDEA and Android Studio, so the IDE integration is very good.
When Google announced back in 2017 that they were going to support Kotlin for Android apps, some people felt they were just acknowledging a move in the developer community that was already underway. Still, they did jump on it, and now everything is "Kotlin First" at Google when creating a new library.
Threading wasn't a major part of Kotlin at the beginning, but the development of coroutines and structured concurrency have made it easier to write Android apps that move off and back onto the UI thread as needed. I agree that I don't think performance is related as much to the language as to the platform itself, so the move to Kotlin doesn't really change performance all that much. That said, it's easier to get the threading right with Kotlin, which is a minimum requirement.