I've been studying Java rather more closely, of late, and I have to admit that I'm impressed. Given all the hype surrounding the language, I've been inclined to be skeptical. Surely any technology that attracts so much investor attention has to be more glossy panels than working interior, or so I thought. It's nice to discover that an interesting little language is actually lurking inside.
The "interesting'' part of Java is the way it mixes ingredients from past languages. It is most definitely a dialect of C, but it borrows heavily from Smalltalk as well. It's an object-oriented language, to be sure, but it's much less like C++ than you might think, given that characterization. In many ways, it is a retro dialect, harkening back to the days when C ran only on eight-bit DEC hardware with few architecture variations.
I appreciate that it is a "little'' language as well. Anyone setting out to make a compatible successor to C or C++ is obliged to truck along a lot of historical baggage. James Gosling and the other designers of Java clearly felt no such obligation. They've been pretty merciless about striking features of marginal utility, in the interest of keeping the result as concise and elegant as possible.
The surprise came when I began transliterating C and C++ code to Java. This is far from a mechanical exercise, but it is also an easier one than you might imagine, given the long list of C++ features not found in Java. Over and over, I've discovered an adequate substitute. In some cases, the substitute has proved to be more than adequate. Programs often read better in Java than in the original.
The language is not without its limitations, of course. For a variety of reasons, it cannot match the performance of a program written in C, or even C++. As a portable language for writing Web applets, it excels, but that is only a fraction of all potential uses. C++ didn't kill off C, as some zealots once predicted. Nor will Java do in either of these predecessors. Rather than fear yet another usurper, we should welcome this interesting little addition to the stable of C-compatible languages.
P.J. Plauger
Senior EditorP.S. Dan Saks is conspicuously absent from this issue. He is in a temporary scheduling overload, thanks to a demanding seminar schedule inflicted on him by Miller Freeman. But fear not, he'll be back in his usual spot next month.####