One of the weirdest things we had to overcome was actually the cultural aspect. For the Linux client, nobody had any problem with the architecture: Get the Qt client working and hook it up to the plumbing. Done. For the iOS guys, still no problem, but let's make sure we separate the C++ cleanly from the Objective-C through a solid, well-understood interface so our food doesn't mix. The Java guys basically threw a hissy fit, objecting to all of this C++ nonsense infecting the purity of their Java. Every time the app crashed: they blamed the C++ code. Every performance problem was because C++. Grandma got sick? C++. When tracking down a bug, they'd step through their Java layer, and as soon as it hit the JNI, they'd just stop and file a bug to the core team rather than dirty themselves stepping through C++. They culturally wouldn't accept C++, and wanted to instead have a separate parallel tree with Java business logic, Java math, Java graphics, etc. The hard reality, however, was that the Android client wasn't bringing in enough revenue to justify a full parallel team and code base. Despite all the grumbling, going the C++ route was a huge success, letting us support multiple platforms with mostly the same code base.
I'm curious as to whether this borderline religious anti-C++ attitude is common in the Java/Android ecosystem, or an outlier? I found it really bizarre.
It's a well known result of theory and practice among people who start delving into more provably safe languages.
So it is natural in a world full of out of bounds exploits, hazardous pointers and use after free/delete, to complain about them.
As for Android, it comes even from the Google team, given the little support they give to the NDK.
I know the old argument was that it was easier to audit the (small) amount of native code in the JVM than the code in your specific project. But half a million lines isn't small by any definition I'm aware of. It's larger than any native projects I've worked on.
Besides there are JVMs implemented in Java too, just not with as high performance as Hotspot... search for Maxine or Jikes RVM.
And, really, who wants to use a language designed for people who don't know what they're doing?
I'm not saying that it's impossible to write a JVM in a managed language. Just that it's funny to hear people talk about native languages with a hint of fear, and then run their "safe" programs on a VM that is implemented with a half million lines of C and C++.
SDL was ok for games, but now with a real app, I tried the Qt way, only to discover there are still lots of issues.
So I figured out, better use JNI and C++/CX directly and save the pain of figuring out bugs in Qt.
In the end, the JNI pain is bigger than figuring out Qt bugs and helping those guys.
For small devshops there is a lot of time to be saved by letting third parties like Digia and Xamarin have to go through the pain of writing platform specific wrappers.
If I was doing mobile OSs for work, I would gladly pay for them.