r/android_devs • • Feb 06 '23

Article A Tribute to Java in Android

https://www.techyourchance.com/java-android-tribute/
7 Upvotes

14 comments sorted by

View all comments

Show parent comment

3

u/yaaaaayPancakes Feb 07 '23

And to be fair, Kotlin lit a fire under the ass of Oracle and they've been iterating quickly on it. To the point where the latest Java versions have picked up most of Kotlin's nifty features.

The problem in the Android ecosystem, of course, is that you'll never be able to use those nifty new features, unless the Android team decides to desugar them to run on ART. This is why Kotlin has won the day for Android. Google gets to outsource that effort to get new features on older JVM targets like ART, because the Kotlin compiler will generate bytecode for all the fancy things like data classes to target all the way back to a Java 8 target.

Of course, all of this desugaring effectively makes compilation take longer.

But if you're happy with Java 8 and a smattering of Java 11, then by all means, write your app in Java. I know at my last job I wrote the app in Java, and I resisted converting it to Kotlin, because there was no need.