Google has thrown its weight behind Java alternative Kotlin, naming it the language to use when developing Android apps.
From this point on, Google will prioritize Kotlin when introducing new features for Android developers, with Kotlin being first to benefit from additions to Google's Android Jetpack
, a collection of libraries and tools for simplifying the creation of 'high-quality apps'.
"Today we're announcing another big step: Android development will become increasingly Kotlin-first. Many new Jetpack APIs and features will be offered first in Kotlin," wrote Google developer advocate Chet Haase
about the announcement, made at the Google I/O 2019 conference.
"If you're starting a new project, you should write it in Kotlin; code is written in Kotlin often means much less code for you-less code to type, test, and maintain."
He expressed surprise at how developers had taken to Kotlin since it was announced as a supported language for Android, alongside Java, two years ago.
"Our top developers loved it already, and since then, it's amazing how fast it's grown," he said.
"Over 50% of professional Android developers now use Kotlin, it's been one of the most-loved languages two years running on Stack Overflow, and one of the fastest-growing on GitHub in a number of contributors."
Kotlin is a modern alternative to Java that is easy to learn and use. It has been described by a Netflix senior software engineer
as offering "some of the best features of other languages" combined with "interoperability with Java", due to its ability to run on the Java Virtual Machine (JVM). Kotlin was the only JVM-targeted language to grow in popularity in this year's RedMonk Programming Language Rankings, rising eight places to number 20. It's worth noting, however, that Java remained far more widely used, sitting in second place in the rankings.
Google's announcement has been perceived as a slap in Java's face in some quarters, although others argue Java will remain relevant to Android development for a long time due to the amount of legacy Android code. There's no also indication at present that Google will stop supporting Java for Android development.
Haase also said that Google, in partnership with JetBrains, is releasing new Kotlin tooling, docs, and training courses, as well as supporting community-led events, including Kotlin/Everywhere
Google also used I/O to unveil six new Android JetPack libraries, including CameraX, new architecture components, and Jetpack Compose, with more details available here.
If you're interested in learning more about Kotlin, check out TechRepublic's guide to free resources that are available.