Oracle should pay Google for using Java in Android and keeping the language somewhere around edge of hip and cool. I wonder how long it will be before Google flips to Go or JavaScript for Android.
In spite all of this, Android Team has given zero support for anything other than Java on Android, even for its own languages.
The NDK is anemic, because "In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need."
Never say never, that's what I thought about Apple and objective-C, and they just invented a new language for it.
True, it runs in the same runtime, but it does allow them to slowly move away from 20 years of history. Mind you, the obj-C runtime / Foundation isn't badly set up at all, I'd argue it's better than the Java SDK.
Go and Java stdlib have very different opinions about the basic types, used by every app (like strings or maps, heck, even about concepts what is a class and class hierarchies, or how the stack is supposed to look like).
So unless you want to wage a perpetual war at the border between your app and Android base libraries, forget Go, or about any language that does not run on JVM.
Without providing close to 100% interoperability, replacing Java with another language would be insane. All the open-source third party libraries for Android (and there's plenty, and many of them have become the de facto industry standard), all of that goes out of the window. I don't see how it could pan out
You make something that's easy for an automatic translation. Then you use that. It's how both AS/400 and OpenVMS kept binary compatibility on completely different hardware over time. The good news is there's a lot of clones of Java in CompSci and compilers of other languages targeted to JRE. Retargeting them to something similar wouldn't be hard. Recompiling bytecodes wouldn't be hard.
It's the high-level language and interfaces that would be hard. The real factor, though, is social given lock-in is in full effect here. Java was a bad, long-term bet given the Oracle acquisition.
So progress should be avoided if it means throwing away everything else?
I can see Android rolling this out across two major releases. The first adding support for a new VM or app language and the second removing Java. Time between those releases will give developers the chance to catch up.
I just think it's silly that you are opposed to throwing everything away. That is what got us in this mess to begin with. Android was supposed to be a simple transition for existing J2ME devs.
If that is the level we are happy about you can already run with Kotlin today. Its not official Alphabet, but it is offical from the company that makes Android Studio and it is roughly to Java what Apples new language was to Objective-C.
Unfortunately that still means that there is no good way to write cross-platform mobile apps.
There is never a good way to write cross-platform apps. Cross-platform programs are always inferior to solutions specifically designed for a particular use case (e.g. touch input + mobile device, pen input + tablet device).
I agree there needs to be a platform specific input output layer, but assuming you are writing the same app on different devices there is always going to be a large core (essentially all the business logic, all models, all validation, all sync code) that is, or should be, the same on all platforms. It is that code I wanted to refer to.
Yeah, unless there's explicit orders from above I don't see them moving (and usually Java people like to live in Java world and ignores everything else)
Google should have started looking at alternatives back them and making another environment first-class on Android as well
(or maybe they can just compile Go to Dalvik and flip the switch, I don't know)
This reminds me of that contest where people had to get the phrase "I smoke crack rocks" into a published academic paper, and the winner was something like "we burnt iodine (I) solution to observe its corrosive effect on stone and witnessed I smoke crack rocks".
Right ? If they keep putting Google under fire for the use of Java, they will only accelerate the process of Google moving away from Java (which is a huge task mind you) and as a result Java will loose a lot of relevance.
Google have indicated a future Android-Chrome merger. Although the public announcements were to the effect of Android simply replacing Chrome, there has been speculation about other outcomes. Perhaps this suit will encourage movement in the other direction, from Android to Chrome.
I'd say never. That would kind of be like an apple switching to Swift for iOS.
This is even harder for the Android runtime because it's run on a virtual machine with characteristics that don't easily map to another language.
Basically if they switch to any other language all the apps that currently use Java (ie. all of them) will have to practically use their own VM -which would be slow - or reprogram everything in another language - which would be expensive.
Actually as a first step the language could be implemented on top of the dalvik vm. It's just that the IR of go would need to change for that target. Something like Truffle for OpenJDK could help by adopting new languages.
I don't see Android team itself is going to switch to Go or Javascript for android.
Otherwise, I would say Kotlin[0] would be a better alternative to Java.
Kotlin is JVM + Java interoperable language and this is its major if not sole selling point. So it does not help Google in any way regarding Oracle-Google copyright and patent issues.
Any kind of support might come when some developers get down and write lot of code to support that language. Android team is not going to add any support just because someone wanted or voted to support new language on Android platform.
At least people who wanted Go on android have written extensive amount of code to add support and still they are far from done.
In spite all of this, Android Team has given zero support for anything other than Java on Android, even for its own languages.
The NDK is anemic, because "In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need."
http://developer.android.com/tools/sdk/ndk/index.html
And the Go and Dart teams had to work on their own even for the NDK integration.
The results of their work aren't even described in any of the official Android documentation sites.