Google, Android and Java

Aleksander Demko,

June, 2016

Java as an application language

Java is a great language. When it was introduced it brought to the masses new concepts such as safety (all operations are defined - they'll throw exceptions), garbage collection, a large API and multi-platform support. For this it traded off both run time and memory performance. However for many areas of software development, like the common database driven business application, it was perfect.

Java as a platform language

For all these reasons Android Inc (and then Google) decided to use Java as the main (and only) platform language for Android. What this means is that if you want to access all the OS functions, your application needs to either be written in Java, or go through Java via the Java Native Interface (JNI). This has many problems:

A growing platform

As Android grew is attracted lots of applications, developers and development environments. For many, Java was not desired or acceptable. Some of these includes:

Alternatives to Java

There has been speculation that perhaps Google might be considering additional platform languages, given the legal and performance issues with Java. Weather this is true or not, I don't know. Here are some of the alternatives (and draw backs) thrown around on the Internet:

Enter C++

In my not-so-humble opinion though, I think Google would be nuts in choosing any of the previous options. I really think the only practical option here would be C++:

To me it seems like an obvious solution. They can either make their own nice to use Android C++ UI library or just buys Digia's Qt library and hit the ground running.

Some of the lowest APIs could be done in C, like the Linux kernel API. Although I'm not a fan of C in general, it's still much easier to link with than a Java VM.