|
|
|
|
|
by marcosdumay
2925 days ago
|
|
Languages do not need a 1 to 1 relationship between the storage medium of a value and the interface it exposes to a programmer. Java's situation is even worse because it's a compiled language that does not need a JIT or even much sophistication from a compiler to keep a single hierarchy on its type system. I suspect the reason Java did it was to not surprise C++ programmers. Solely dictated by marketing, not by technical reasons. |
|
Sure, but that doesn't excuse the well-documented 'sufficiently-smart-compiler fallacy'.
The performance improvements that can be had by the escape-analysis/object-inlining family of JIT compiler optimisations, are considerable, but even today, production JVMs don't do a very good job. It's not an easy problem to solve well.
> I suspect the reason Java did it was to not surprise C++ programmers. Solely dictated by marketing, not by technical reasons.
I sincerely doubt it. You're wrong to dismiss the performance question.