J
James Kanze
Not really. At least, I've seen very few cases where either
language would have been equally applicable.
Better GUI library.
Also, GUI based code tends to be less critical, and deployed
more widely. Both considerations which argue for a VM. (The
second argues for a wide spread VM, and JVM is about the most
wide spread one you can get.)
Which gives it a definite advantage with regards to execution
speed.
The 8/16/32/64 differences aren't really a problem with byte
addressing. It's when you encounter a 36 bit 1's complement
machine that things will likely slow down. Although probably
not as much as one would expect. (Differences in the floating
point model are likely to be more significant, since it is
considerably more difficult for the JIT compiler to determine
when the "as if" rule can apply.)
Just for information, the most widely used Pascal implementation
(UCSD) used a VM.
They definitely target different types of applications.
language would have been equally applicable.
Better GUI library.
Also, GUI based code tends to be less critical, and deployed
more widely. Both considerations which argue for a VM. (The
second argues for a wide spread VM, and JVM is about the most
wide spread one you can get.)
In reality, a VM is an additional software abstraction layer
between real OS and the programming language of the VM.
Which gives it a definite advantage with regards to execution
speed.
So having native code communicating with the OS/hardware is
clearly more efficient space and run-time efficient when VMs
characteristics do not map directly with the OS/hardware
(example, a "32-bit" VM running on top of a 64-bit OS/hardware
or the opposite, or a "8-bit" VM on top of 64 bit OS/hardware
or the opposite).
The 8/16/32/64 differences aren't really a problem with byte
addressing. It's when you encounter a 36 bit 1's complement
machine that things will likely slow down. Although probably
not as much as one would expect. (Differences in the floating
point model are likely to be more significant, since it is
considerably more difficult for the JIT compiler to determine
when the "as if" rule can apply.)
This isn't bad where run-time and space efficiency are no
primary concerns.
There are examples of native code programming languages where
this is also the case, Pascal for example.
Just for information, the most widely used Pascal implementation
(UCSD) used a VM.
As I said, the design ideals of JVM and ISO C++ are different.
They definitely target different types of applications.