← Back to context

Comment by freedomben

5 days ago

As someone who has been out of the Java world for many years, but recently forced back into it due to Android dev requirements, Post lawsuit, what is the relationship between Android (Google) and Java now? When can we expect 26 on Android? On that note, why is Android always so far behind? Is it because Kotlin is primary or is it deeper? Did the lawsuit play a role?

Java's primary development happens on OpenJDK.

Android has their own runtime (creatively named as Android runtime), which does not run java byte code, but their own binary format. JVM class files can be compiled to that format, but the support for that always lags behind OpenJDK java versions.

Part of the reason kotlin became the de facto language on the platform was that they supported only terribly old Java at the time, that didn't even have lambdas even though it was already out.

The problem is that most of the Java libraries want to follow the desktop/server, aka the OpenJDK scene, but that would make them incompatible with Android so there was/is some incentives to bump up the version they support.

The new (ish?) Android UI toolkit is only useable from Kotlin and is implemented fully as a compiler plugin. Google has been clear that Kotlin is the Android language now and that's where new features are going.

I've used Java decades ago (anyone remember servlet?) and I'm glad that I can use flutter for Android development.

  • I do really need to give flutter a try. My only reason I haven't yet is that I have no desire to learn Dart. How do you (or anyone) like Dart compared to Java or Kotlin?

    • Went from c# to flutter and it was easy.

      The new concepts for me were using immutable classes with the keyword "final", and the whole concept of state management in mobile apps because I've mainly done backend.

      I've only used kotlin in the android files for flutter but nothing else.

      I'm also not totally objective on that because my Java experience is from a long long time ago, my general feeling is that flutter is less bloated than java.

      And I don't want to start a culture war on this, because we all know turbo Pascal is the best.

    • I have way more experience with java on android than Flutter, and Flutter so far has been a breeze.

    • Kotlin with Compose is a massively nicer experience than Dart/Flutter

      Now with KMP you can build a desktop/iOS/Android app with single codebase as well.