The fact that Excelsior is dead probably says something.
There are AoT compilers for Java, but I'm not aware of any successful widely-used ones. Java and the Java ecosystem rely pretty heavily on class loaders and reflection which make AoT compilation very difficult. Java in its bones is designed to be a JIT VM language and you'll always be going against the grain if you try to statically compile it.
Dart was also initially designed to be a JIT VM language (by the same folks who made the HotSpot JVM) but without many of the pitfalls in Java that make AoT hard, and over time we have deliberately evolved the language (in breaking ways!) to make it much more amenable to static compilation.
Languages are not all interchangeable and some languages are better suited for certain implementation strategies than others.
GraalVM native is quite a big thing nowadays, and reflection is not really a problem for AOT, class loading is more so, but that is easily solvable by assuming a closed world (the way Graal does it). So you just simply list all the classes you plan to reflect on/load and that’s it.
> Languages are not all interchangeable and some languages are better suited for certain implementation strategies than others
Sure, but I don’t claim to replace SQL or Prolog with Java, but a regular old managed language which has zero unique features that would give it a reason to exist.
> More importantly, it was a Google language that they could mold for their own needs, not so possible if it's an outside language like TypeScript. For example, early on, they asked the Dart team to create an AOT compiler since Apple does not allow JITted code apparently (not sure how React Native gets around this then), or maybe it didn't back then, and the Dart team was able to do it successfully for the Flutter team. Try asking the TypeScript team to do the same, it's next to impossible.
Why would you need to modify the language? Dart is the most basic managed language without any novel feature. There is zero reason why, say, java couldn’t have been fitted for this particular niche.
How will you convince the Java team to add things you want to make it work better for your framework? You could try adding them yourself but you'd be forking and making your own Java dialect at that point. They did that instead with Dart which they own.
What would you need for a framework that can’t be implemented as a library? Will we recreate every language from scratch for the next logging, gui lib, web framework as well?
For example, making an AOT compiler. Or adding other features. Or making the implementation more suited to client side apps. There are many things you can do to a language to make it easier for a specific use case. In the extreme, this is what DSLs are.
I don't understand why you don't understand that having first class control over a language's development is a useful thing to have.
All else being equal, it is still useful to have control over a language's development. It doesn't matter that Dart may or may not have features not present in other languages, as long as they can add them as necessary based on Flutter's development.
If Google really wanted they could have wrote one.