4 ms·
Like Java and unlike C++, you have platform independent packages. Like C++ and unlike Java, you have features like value types (struct).
by qznc 8y ago
Like Java and unlike C++, you have platform independent packages. Like C++ and unlike Java, you have features like value types (struct).
- vaylian 8y agoTrue. Java makes it trivial to write cross-plattform code. But we are no longer in the 90s. There are plenty of cross-plattform C++ libraries available that make it easy to write cross-plattform programs. I do not think that this is such a major argument any longer. And yes, Java is very feature-conservative.
- pjmlp 8y agoTry to compile those C++ libs on Windows and run them on Linux, without recompiling them. As strange as it may seem to you, that is how a large set of corporations work.
- DannyB2 8y agoAlso I would point out that your compiled Java binary apps might run just fine on a platform not existing at the time it was compiled. Example: I wrote a Mandelbrot program compiled as a double-clickable JAR. Nearly a decade later I find that it runs just fine, albeit more slowly, on . . . a Raspberry Pi.
- jayd16 8y agoYou might not think it's a valid argument but the thing that you're missing is that others do not want to write cross platform C++. They want to write nicer Java and that's C#.
- MaxBarraclough 8y agoThere was a project to add structs (record types without heap allocation) to OpenJDK, but it seems to be dead. [0] There's also this less dead looking project, with goals that seem pretty similar. [1] Perhaps some day Java will finally gain this feature that obviously should have been there in the beginning. There's a reason .Net has them. [0] http://openjdk.java.net/jeps/169 http://openjdk.java.net/jeps/169 [1] https://cr.openjdk.java.net/~briangoetz/amber/datum.html https://cr.openjdk.java.net/~briangoetz/amber/datum.html