Or, you can also say that the adoption of LLVM compilers, Javascript/Node, Python, and Ruby, show that people are more into VMs than ever.
Please elaborate, i'm interested.
First I judge by new projects/tools that interest me. I don't see much ruby there, but a fair amount of python admittedly. This could be biased to what interests me, obviously.
The second is people I know. Some are ex ruby devs, none still use it in their line of work.
The third is job trends. Ruby, specifically Rails, is just down by any metric. A quick google search sent me to http://www.indeed.com/jobtrends/q-Ruby-on-rails.html
Again, I said 'seems' because it seems that way to me, not because it is fact.
Bytecode can be translated quite well to native code. So I'm wondering if this isn't about "VMs versus native" as much as it is about "garbage collected versus unmanaged memory".
I believe that is how .NET works (the byte code gets distributed, and the user compiles it to native immidietly before execution).
Also, Android's ART is the replacement for Dalvik that compiles Dalvik bytecode into native code at installation.
I think the performance differences between JIT compiled code and native code mainly come from the 'convenience' features offered by languages such as Java or C#. I am thinking of garbage collection, (default) virtual functions or reflection.
In let's say c++ you can do all of these things too, but the cost is not hidden from the developer.
Why do you say this? There's lots of examples out there and Android is one of them.
Java on the other builds its process image on the heap, using the executable file as input. Nothing is executed out of the binary file directly afaik. I believe classloading (defined in the Java spec) actually prohibits doing too much of this work ahead of time. The JVM has to defer work until startup in case the user wants to define a custom classloader.
My knowledge of the JVM is very basic compared to my knowledge of ELF, but I believe the basic gist of this is correct. I'm interested in diggging into this difference more deeply and writing a well-researched blog entry about it.
OAT, in turn, is a playful anagram of AOT, because what Android now does is even more powerful than the JVM or ELF. Android includes a JIT but it also does nightly profile guided optimizations. So not only does Android perform the preloading optimization you mention for ELF but as the user continues to use their apps Android will continue to optimize the compiled binaries.
Did you actually look at the numbers?
Go is certainly gaining some popularity, and Rust too (although an order of magnitude below Go) but both of these still have a fraction of the mind share that Java has.
You're being dazzled by the hype and forgetting to look at hard data.
These days, the Java code in an android app is compiled to native anyway.
I'd like to go off a tangent here. On LineageOS, under privacy settings you can deny apps permissions such as run at boot and run in background. I wish deny was default mode in all of Android and that apps would have to ask for permission to run at boot. This is good for the end user and this is good for Google as Play Services should have this turned on by default meaning greater adoption for Google Cloud Messaging. This can't happen in one step because the proverbial cat is currently out of the bag and we have to sort of slowly put it back in. Something similar needs to happen with all permissions. File storage: afaik all apps have access to their own data store. Most apps should not need access to device storage at all. Almost no app should require access to phone permission.
For example, look at this page by Capital One: https://www.capitalone.com/applications/mobile/android/permi...
> Don’t worry, we aren’t going to call you to find out your plans for the weekend. This permission allows us to use unique phone information (SIM ID and phone number) to guard against unusual sign-in activity. It’s a little extra security to help protect your money.
What is this madness? If it were up to me, I'd ban the capital one app for this amount of ridiculousness.
That being said, I am not an iOS fan either. I have problems with iOS as well. Why isn't there a way to limit data usage to say n MB a month? Why in the world should it take an OS update to update iMessage or Safari? How is this still a thing now that the iPhone is almost ten(!) years old?
Fingerprinting devices to detect unusual logging activity? This is common. Heck, I've had Google lock me out until I confirmed with my recovery email after logging in from a new device. Much more common is simply getting an email after logging in from a new device. The most common method of doing this is for desktop sites is, I assume, IP address; which obviously does not work for phones.
This is too heavy-handed. Capital One lets me log in from any computer browser anywhere using just my username and password. As of Marshmallow,
> The most straightforward solution to identifying an application instance running on a device is to use an Instance ID, and this is the recommended solution in the majority of non-ads use-cases. Only the app instance for which it was provisioned can access this identifier, and it's (relatively) easily resettable because it only persists as long as the app is installed.
https://developer.android.com/training/articles/user-data-id...
The only pertinent use case the document details for using Phone permission for a credit card app:
> Abuse detection: Detecting high value stolen credentials > In this case, you are trying to detect if a single device is being used multiple times with high-value, stolen credentials (e.g. to make fraudulent payments).
> We Recommend: IMEI/IMSI (requires PHONE permission group in Android 6.0 (API level 23) and higher.)
> Why this Recommendation?
> With stolen credentials, devices can be used to monetize multiple high value stolen credentials (such as tokenized credit cards). In these scenarios, software IDs can be reset to avoid detection, so hardware identifiers may be used.
but the capital one app does none of those things! Even if it did, I'd imagine I am a pretty average user and all I want to be able to do is look at my list of transactions and pay my credit card bill every month and maybe cash out my reward. The phone permission can wait until you really need it.
If we criticize Amazon for encouraging users to make their devices less secure https://www.amazon.com/gp/help/customer/display.html?nodeId=... then we should criticize Capital One for permissions proliferation as well.
I understand what the author of the article is saying. Android seems to be flawed, on a business and an architectural level. I'm just not sure changing a programming language will fix that. The resource problems, in fact, arise from the lack of tight integration between hardware and software. Basically, iOS is more than just an OS. It's very tightly integrated with the hardware of the various iPhones. Those integration points are all revisited in every update to ensure no regressions, and often, to implement improvements.
Speaking of updates, that's another problem with Android. (If we're being fair, I think that problem too is a problem of the more loose hardware integration). But the fact remains that as long as the OS is yoked with the business requirement of being able to be deployed by any OEM, on any hardware they slap together... Android will have update problems. OEMs are sometimes trying to throw a 2.5 cent network chip onto a 40 cent phone and expect Android to handle it with all the speed and grace that iOS handles the rigorously vetted hardware and professionally customized, hand coded firmware that Apple puts in their phones. This is very difficult to do. In fact, I think it's unreasonable to expect that this can be accomplished at all in the market that Android OEM's have to operate in.
Google needs to decide what they want... do they want Android in the hands of the majority of device users? Because if they do... they are going about it absolutely correctly. (Afterall, Microsoft beat Apple SOUNDLY in the pc market... but the reality is that it required many Windows installations to run on some very unstable hardware builds.)
Alternatively, Does Google want to make better DEVICES than Apple? If this is what they want to do... yeah... Android is just NOT going to get them there. It probably is a dead end.
But either way... it's not because of Java, or Rust, or whatever programming language we're blaming it on today.
It really is a problem of ... let's be honest ... a lot of substandard hardware that OEM's are pawning off as being the same as the good stuff. As well as firmware that many of them just don't want to invest much time and money into perfecting. (Because the return on that investment is so low.)
You could change your VM and programming language tomorrow... you'd still have the problem of OEM's slapping cheap hardware and barely functional firmware into something that looks just like all the other Android phones and saying, "Buy MINE!!! It's cheaper!!!"
My own experience is that iOS feels more sluggish than Android for vanilla variants of Android.