• 6 Posts
  • 13 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • I think there are different aspects to it.

    Amazon’s delivery service is better than ever. You get products in half the time, with less packaging, and fewer miles traveled to deliver it to you, without any significant increase in delivery fees.

    Price is still competitive when you take into account delivery cost and speed. If you don’t care about those, Amazon isn’t the cheapest.

    Search and reviews are down the tubes. It’s like Amazon no longer cares if their site is overrun with crap products as long as people are buying them.

    Amazon still works great if you only buy name-brand products that are fulfilled by Amazon.









  • Who would it simplify things for?

    Not for the developer. For developers, compiling in advance would just slow them down and remove a lot of the cool things you can do with Java today like hot-swapping and reflection.

    Not for the user. The current system is totally transparent to the user.

    You’re proposing making things simpler for the Android OS, but worse for the developer. That’s the exact opposite of what they want. A lot of Android is quite complex in ways that make things easier for developers, on purpose.


  • I think the main issue is who it’d be simpler for. Let’s say that they switched to AOT compiling. That enables them to “simplify” the way Android works internally.

    Who does that actually make things simpler for?

    Literally ONE subteam of the Android team at Google. Nobody else.

    It wouldn’t make things any simpler for developers. In fact, it’d make things worse because AOT compilation is slower and doesn’t allow things like hot-swapping code while your app is running - something you can do now with Java.

    It wouldn’t make things any simpler for OEMs. They don’t have to worry about the Java runtime at all, they just worry about drivers.

    It wouldn’t make things any simpler for the other 99% of the Android team that builds new APIs, new drivers, etc.

    Basically you’re proposing a radical change that would make the platform worse for almost everyone, just so that one pretty small team at Google that builds the Java runtime portion of Android could make it a little simpler???

    You say the current system seems “too complicated”. I agree it’s complex, but for a reason. Actually just about everything in tech is complex if you peek behind the curtain and learn how it works inside. The only difference here is that the code is open so anyone can see how it works. But for the most part these are just hidden details.

    I guarantee that if you looked into how video frame compositing on Android works, or how low-latency audio works, or any of a hundred other things, you’d realize they’re incredibly complex too - probably “too complicated” at first. But that complexity is for a reason.



  • First of all, since the very early days Android has always allowed apps to make use of native code using the “NDK”, and in fact most games and most apps that do any sort of AI, image processing, or anything else complex like that make heavy use of native code already, for performance reasons.

    Keep in mind that the decision to base Android apps around Java was made back in 2003 when Android was founded. Some of the reasons they picked Java were:

    • It’s one of the most widely known languages by developers
    • It’s hard to write code in languages like C and C++ without introducing memory bugs and security bugs. Using a higher-level language makes those bugs far less common.
    • It’s portable - you note that Android only supports arm64 now, but at the time it was arm32, and Android has actually always had some level of support for x86 - you can run the emulator for x86, and some x86 Android devices exist. Using a bytecode language means Android is future-proof
    • It’s not limited to just Java - the JVM has a rich ecosystem of languages that developers can use

    Now 20 years later I think it’s worked out pretty well. It’s hard to imagine picking a different language would have worked out better. Java is still just as popular as ever, and Android developers can take advantage of all of the Java tools from any other platform or application.

    Apple’s original option for iOS apps was just Objective-C, which is higher-performance, but overall it’s a more obscure, difficult to use language. Developers adopted it despite Obj-C, not because of it. Apple had to invent Swift to provide a more modern alternative, because Obj-C is basically not used anywhere else and it felt very ancient. While Swift is a pretty great language, it’s still somewhat obscure, only used for iOS and Mac apps - while Java and JVM languages are used everywhere.

    Anyway, let’s say that Android really did want to switch, for some reason. I’m not sure why you think switching to compiled code would be less complex. How would all of the millions of existing Android apps migrate? What native languages would be supported? It’d be a huge transition for dubious benefits.

    As it is, Android is extremely flexible. While the official APIs require a JVM language, because of the NDK you can basically write Android apps in whatever language you want. People have built frameworks enabling you to build Android apps in nearly every language under the sun.