Drop "androidx" from Jetpack Compose package name, for multiplatform, before 1​.​0 release.

0 have signed. Let’s get to 500!


Jetpack Compose is multiple things under one name:

  • A compiler plugin that helps efficiently calculate the difference between two in-memory tree data structures
  • A new UI toolkit for Android
  • A new UI toolkit for desktop apps (Compose Desktop)

The support for desktop and platforms other than Android is currently done by external contributors:

  • JetBrains works on the desktop side publicly, and briefly told about undergoing iOS experiments.
  • Other individuals and entities experimented with the WEB (Andrei Shikov) and iOS (Clément Beffa) to name a few

For context, JetBrains is the company that initiated and maintains Kotlin, and since 2018, the Kotlin Foundation exists, also backed by Google.

The're two naming problems in Jetpack Compose.

All Compose symbols currently live in the androidx.compose package, which is very confusing since Compose isn't limited to the Android platform and can work on all major OSes, and probably on future OSes, even by Google.

To put it another way, you can imagine developing an Android app where all UI code has imports starting with "windowsx", "macosx" or "iosx". It'd become hard to see what is supposed to work on one platform and what is supposed to be multiplatform.

I won't go too deeper into the confusion scenarios it brings and will keep on bringing if this stays unchanged, this is an exercise left to the reader.

The second problem has been brought up mostly by Jake Wharton.
Link to the Tweet: https://twitter.com/JakeWharton/status/1344288216019595266
Direct link to his blog post named "A Jetpack Compose by any other name": jakewharton.com/a-jetpack-compose-by-any-other-name

Long story short: We have one name for 2 things, and no easy way to distinguish the two. Non radical change promoters suggest to name the UI part "Compose UI", and the compiler part for tree diffing just "Compose", but others, because of the concern that the compiler part can enable different UI implementations reasonably suggest a more drastic renaming so it allows to have concurrent UI frameworks built on top the the Compose compiler without creating confusion.


The first problem is really important because the confusion is present even if you stick to Google's UI framework that is built upon the Compose compiler plugin.

The second is not a problem to ignore either, especially since there's already people doing no UI things on top of the Compose compiler plugin. It'd be great if in handling the first problem, the second one is addressed as well.

Finally, since the Compose API is still changing, and, at the time of writing, is still in alpha stage (though the remaining time before beta seems to be collapsing rather quickly), it's probably the best time to do this change.

Our minimum request is to change "androidx.compose.*" into "compose.*" before 1.0, and preferably, before the first beta release.

 

I want to dedicate the last words of this for the credit/recognition topic:

I understand that Google is investing a lot in Jetpack Compose and at minimum, needs to be given the credit for making it. However, I'm pretty certain that this credit doesn't rely on the package naming for the code and that forcing developers to put "androidx" in non Android code is unnecessary and that the confusion and issues caused by this would be worse than renaming now and stop it before it's too late.

Without even touching some Compose code, it's very clear from the website, to the official documentation, to the "Jetpack" family, to presentations by folks from JetBrains, and from the community about both the Android and the Desktop side, it's very clear that Compose is from Google, and we want to thank you for that wonderful project that will serve for the years to come, probably the decades to come, maybe centuries.

All the best,

Louis CAD
Kotlin GDE