Will Android switch from Java to Go?

May 16, 2012
16 1 5

Apple owns Objective-C. Microsoft owns C#. Google obviously doesn’t own Java, which is a shame because they had their chance when Sun was heading toward bankruptcy and they missed it. Granted, $6 billion dollars would’ve been quite a lot of money for Google to pay just to own a language, especially when Android wasn’t that big early on. But considering Google was willing to pay at least $4 billion for Skype and Hulu, I’d say that owning the language for Android apps would’ve been worth it. Plus, they could have junked whatever parts they didn’t need, or sold Sun later to Oracle or some other interested third party.

But why did Google choose Java anyway? Well, there weren’t that many popular choices that were also in good standing with developers. In Additionally, Google  had quite a lot of developers that were using Java because they need it for their own infrastructure. Since it was also open source, they decided to fork the Java Virtual Machine, and create the Dalvik VM. This is not exactly unheard of in the world of open source software, and in fact, it’s not even the first time this happened to Oracle since they bought Sun.

For example, the people who made OpenOffice got angry with Oracle’s greed, and forked it into LibreOffice. Usually, this is perfectly normal behavior in the open source world. It’s not like that would stop Oracle from suing Google anyway, which is why Google may take issue with Java right now.

Moving forward, Google is already considering alternatives for Java, such as their own language Go v1.0, which they just finished recently. From what developers are saying, it’s one of the best languages out there right now. Here’s why Go was created:

“Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java.

Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for.”

Go does sound impressive, but unfortunately that’s not the biggest issue with moving Android to Go, or any other language. Doing this will disrupt a lot of things not only for Google but also for the entire Android ecosystem. Android developers will now have to learn Go, if Java is deprecated. Google will need to find a way to make Go a cross-platform language like the Dalvik VM, so it works for other chip architectures.  Finally, they will have to do some major rewriting for Android to support Go as well.

In the long run it definitely sounds like something that would be ideal for Google since they’d have full control over what happens with the language. Since it’s such a friendly language they might even get developers to be interested in learning it, just like the vast majority of iOS developers had to learn Objective-C to make iOS apps. But in the short term this transition would definitely be painful for Google and everyone else. So right now they might be considering it, and even doing experiments with it, but I doubt we’ll see anything come out of it in the next few years. Of course, this all remains to be seen pending a win in the lawsuit with Oracle.


  • Jman

    They could just use Python and solve all these problems! … =/

  • Mitch

    Python is slow.

    They should go all Native, but that would require a LOT of porting.
    I would LOVE to use C or C++, but because I can’t, I don’t waste my time on Android.

  • zombiecalypse

    Going full native would be a bad decision with Android being aimed at multiple architectures.

    But what really bugs me is the trend of everybody and their having their own language. It just means worse tool support for everyone and there is no language (save maybe php or perl) that is so bad that it makes sense to invest in complete migration.

    In this specific case I don’t think it will happen (or at least that java dev would still be possible). Go is OK, but it doesn’t have any killer features that I know of. Or maybe that’s just me being cynical about everything having been done before (think erlang).

    • Mitch

      It really doesn’t matter. Android is (over 90%) on ARM architecture. So, really, it doesn’t matter.

      Also if you want the binary to function on every CPU, they could still use a fat binary, or put multiple compiled versions in one package. Speed is worth it. Plus the additional speed would result in:

      less heat damage to phone, longer battery life, more multitasking.

  • Mike Brown

    Apple does not own Objective-C in any way shape or form. Microsoft does not own C# in any way shape or form. Both Objective-C and C# are standards….and Oracle, does not own Java either…they own Java ME….but not Java.