This seems backward to me. C++ has a great deal of undefined behaviour, which you don’t get in Java. And Java has had a memory model for years - until recently nobody could argue their parallel code was correct on C++.
If you want guarantees Java seems like the better option.
Oracle (HotSpot) GraalVM (also Oracle) Zing OpenJ9 ExcelsiorJET
Performance was radically different between them, but the answers where the same (ok equivalent as this a whole lot of parallel code).
My co-workers can't even get their C++ compiler to be accepted by two different compilers and it is not just them. Compiler upgrades are feared events where significant effort needs to be put in.
While even the hard upgrade to Java9 from 8 was 3 extra commandline switches on startup. For a project with 168 dependencies and more than 1 million lines of code. Done in one afternoon, with the upgrade to Java 11 taking 3 minutes. (needed to add java mail to the WAR/classpath instead of expecting it to be in the JDK)
Upgrades from 5->6->7->8 where equivalent or simpler. Eleven years in two bugs due to an upgrade. One a compiler bug in 1.7.45 an other not overriding all the methods from abstract list in a list of string implementation that uppercased on retrieval. Trivial compared to C++ upgrades.
I spent close to a week on data corruption that would have never been possible in Java.
C++ is not for the weak of heart. It's like the wild west. I have since moved to the civilisation of Java and quite happy here.
Sun open sourced a lot of software, but they didn’t co-operate with the community. When Oracle bought Sun, I remember thinking that they may have been the only company to have a worse open source background than Sun.
I’ll admit that Microsoft probably isn’t any better as far as actually being open (compared to throwing the source code over the wall on occasion?, but (1) they aren’t any worse, and (2) they never sued Google for using clean-room implementations of their programming language and libraries.
I can't see why you have understand it like that, but I agree with the rest.
Now with .NET Core that is slowly changing, but .NET Core still needs to catch up with many .NET Framework features, specially enterprise frameworks that run on top of .NET.
https://en.m.wikipedia.org/wiki/List_of_compilers#C++_compil...
What many think is ISO C or C++ is actually compiler specific behavior, because they never bothered to read the actual ISO, just some programming book.
Why would you need to? Build your binary, test it, give it to your customers. Why do you have to test every compiler?
For example your carefully written C++ code with gcc, might crash and burn with the TI compiler that is the only way to target a specific SOC.
Or maybe that other customer doing HPC only accepts your code if compiled with Intel or IBM compilers.
Then you build it, test it and deploy it. No clue what you are on about.
Check Boost's codebase as an example of such portability efforts.
JNI >>> Any other interface to C/C++.
Due to Oracle's actions, Java is not free software any longer.
At least with C++, there are several companies involved, and its inventor doesn't work for one software platform in particular (herb sutter works at Microsoft, that I will agree). I don't know how 'iso' Java is, but to me c++ is much more adaptable.
Java requiring a jvm makes things a little complex. Does the jvm offers guarantees like c++ does? I trust c++ more, because once it's compiled, there are much less uncertainties.