Balaji Raghunathan
braghuna@stratacom.com
C/C++ programs, as you point out, often use OS- or CPU-specific features. Existing C/C++ software written to APIs and GUIs such as Win16, Win32, the Mac Toolbox, OS/2 Presentation Manager, or Unix Motif would have to be extensively rewritten. C/C++ by nature is a statically linked and compiled language. References to methods, for example, are resolved at link and compile time by a C/C++ compiler-linker. With Java, those references are not resolved until run time because Java programs load classes dynamically. It would take major reengineering to make C/C++ work like Java. Someone would have to write C/C++ virtual machines to run on all the major platforms, as well as develop a standard set of class libraries to abstract the OS-specific features of those platforms -- as Sun did for Java. Imagine the infighting over this evolution among the major vendors. Sun had the luxury of defining a new language from scratch.
There is an alternative: Other languages can target Java bytecode when they
compile. Think of bytecode as the native instruction set of the Java virtual machine. It's already been done for Ada, and there have been experiments with a Smalltalk compiler. James Gosling, the father of Java, says that even Visual Basic could target bytecode. This opens up exciting possibilities.-- Tom R. Halfhill, senior editor