Hacker News new | ask | show | jobs
by habosa 3758 days ago
It's easy to run other languages on Android (see Go binaries). It would be a huge effort (and some would say a distraction) to port the Android SDK to another language. It would also fragment the developer ecosystem if that language was not compatible with Java libraries (reducing your choices to Scala, Clojure, etc).

While the NDK is hard to use, it is enough to enable alternate modes of Android development. For instance with Unity you can develop and Android app using C# and the Unity graphical editor. That's a very powerful option for certain classes of apps.

1 comments

OTOH, that same fragmentation also means competition. Allowing for multiple independent languages to run on the platform means a plethora of developers to whom the platform is now accessible.

Having an API that is easy to use would really open up the ecosystem. Also, having much faster, machine targeted code (ie: compiled with CPU architecture and model specific optimizations and instructions) in C, C++, Rust, Go, etc. would mean better performance and less battery usage in some apps, which overall would translate to a superior user experience.

> which overall would translate to a superior user experience.

Only for users of devices that the dev bothered to put out binaries for. I guarantee you most devs that use the NDK are not building for all 8 ABIs that the NDK supports. ARMv7-neon may be the most common arch but it is far, far from the only one.

Since the compilation to native code takes place at installation time, supposedly ART would take advantage of the CPU specific features.

Also they could in theory do escape analysis to do stack allocation.

And assuming Google does indeed keep up with Java versions, eventually value types will be supported.

The only way they are going to move away from all the framework code they have invested in Java (the language) is if they create a common runtime like WinRT or Objective-C runtime.

However, it is quite telling that the Android team doesn't even bother to add Go or Dart support to the NDK.