Previous | Table of Contents | Next |
In the secondary competition between C++ and other newer languages supporting abstraction mechanisms (object-oriented programming languages, languages supporting data abstraction), C++ was during the early years (1984 to 1989) consistently the underdog as far as marketing was concerned. In particular, AT&Ts marketing budget during that period was usually empty, and AT&Ts total spending on C++ advertising was about $3,000. To this day, most of AT&Ts visibility in the C++ arena relies on Bell Labss traditional policy of encouraging developers and researchers to give talks, write papers, and attend conferences rather than on any deliberate policy to promote C++. Within AT&T, C++ was also a grass-roots movement without money or management clout. Naturally, coming from AT&T Bell Labs helps C++, but that help is earned the hard way by surviving in a large-company environment.
In competition, C++s fundamental strength is its ability to operate in a traditional environment (social and computer-wise), its runtime and space efficiency, the flexibility of its class concept, its low price, and its non-proprietary nature. Its weaknesses compared to newer languages are some of the uglier parts inherited from Cits lack of spectacular new features (such as built-in data base support), its lack of spectacular program development environments (only lately have C++ environments of the sort people have taken for granted for Smalltalk and Lisp become available for C++), its lack of standard libraries (only years after C++s initial appearance did major libraries become widely available for C++and there wasnt a significant standard library until 1996), and its lack of salespeople to balance the efforts of richer competitors. With C++s recent dominance in the market, the last factor disappeared. Some C++ salespeople will undoubtedly embarrass the C++ community by emulating some of the sleazy tricks and unscrupulous practices that salespeople and advertising folks have used to attempt to derail C++s progress.
An important factor, both for and against C++, was the willingness of the C++ community to acknowledge C++s many imperfections. This openness is reassuring to many who have become cynics from years of experience with the people and products of the software tools industry but also infuriating to perfectionists and a fertile source for fair and not-so-fair criticism of C++. On balance, I think that tradition of throwing rocks at C++ within the C++ community has been a major advantage. It kept us honest, kept us busy improving the language and its tools, and kept the expectations of C++ users and would-be users realistic.
In competition with traditional languages, C++s inheritance mechanism was a major plus. In competition with languages with inheritance, C++s static type checking was a major plus. Of the languages mentioned, only Eiffel, Modula-3, and Ada95 (Tucker, 1992) combined the two in a way similar to C++.
In 1995, Java burst upon the programming scene with an unprecedented style of and amount of marketing. This was the first time that the resources of a large corporation had been thrown squarely into a programming language debate. Suns corporate marketing ran prime-time television and whole-page newspaper ads proclaiming the virtues of using nothing but Java (100% pure. No non-Java code) aimed at non-programmers. Sun apparently saw Java as a means of survival by harnessing the widespread anti-Microsoft feeling. In this context, language-technical issues were strictly secondary to corporate strategy. The Sun white paper launching Java set the tone by claiming Java superior in all ways to essentially all modern general-purpose programming languages, including C++, Smalltalk, and Eiffel.
Superficially, Java resembles C++. The Java syntax is very similar to C++s, the Java inheritance mechanism is basically a subset of C++s, Javas built-in data types are a subset of Cs, and Javas exception-handling mechanism is almost identical to C++s. This inevitably led to comparisons between Java and C++ for real-world projects. However, Javas model of objects is much more similar to Smalltalks than it is to C++s, and in some ways it resembles Simulas. As usual, C++s raw speed and ability to manipulate low-level resources directly placed it in a strong position. So did C++s ability to directly and efficiently use the immense amounts of existing code in C, C++, Fortran, and so on. In addition, Java did not have a mechanism for expression parameterized types and classes, nor ways of defining user-defined types that can be used exactly as built-in types. Instead, Java offered type safety, guaranteed (as opposed to C++s optional) garbage collection, and a concurrency mechanism. This adds up to fundamental differences in programming style and efficiency.
Only time will tell to what extent Java and C++ are really competitors in the significant application areas. Java is advertised as simpler than C++ and accessible to less-skilled programmers. I doubt the claim about simplicityespecially as the Java language is still growing and massive libraries are an integral part of a programmers worldand less-skilled programmers are simply not going to succeed at the more ambitious projects at which C++ excels. It remains to be seen how Java evolves, how it scales to larger projects, and whether the Java community is able to maintain a common set of libraries that is large enough to allow significant systems to remain portable in the face of the inevitable attempts of platform suppliers to lock in their users through incompatibilities and extensions.
C++ was designed to be a systems programming language and a language for applications that had a large systems-like component. This was the area that my friends and I knew well. The decision not to compromise C++s strengths in this area to broaden its appeal has been crucial in its success. Only time will tell if this has also compromised its ability to appeal to an even larger audience. I would not consider that a tragedy because I am not among those who think that a single language should be all things to all people; and C++ already serves the community it was designed for well. However, I suspect that through the design of libraries, C++s appeal will be very wide.
Previous | Table of Contents | Next |