Previous Table of Contents Next


6.8. Retrospective

It is often claimed that hindsight is an exact science. It is not. The claim is based on the false assumptions that we know all relevant facts about what happened in the past, that we know the current state of affairs, and that we have a suitably detached point of view from which to judge the past. Typically, none of these conditions holds. This makes a retrospective on something as large, complex, and dynamic as a programming language in large scale use hazardous. Anyway, let me try to stand back and answer some hard questions:

  Did C++ succeed at what it was designed for?
  Is C++ a coherent language?
  What was the biggest mistake?

Naturally, the replies to these questions are related. The basic answers are yes, yes, and not shipping a larger library with Release 1.0.

6.8.1. Did C++ Succeed at What It Was Designed For?

“C++ is a general purpose programming language designed to make programming more enjoyable for the serious programmer” (Stroustrup, 1986a). In this, it clearly succeeded, especially in the more specific aim of letting reasonably educated and experienced programmers write programs at a higher level of abstraction (as in Simula) without loss of efficiency compared to C for applications that were demanding in time, space, inherent complexity, and constraints from the execution environment.

More generally, C++ made object-oriented programming and data abstraction available to the community of software developers that until then had considered such techniques and the languages that supported them such as Smalltalk, Clu, Simula, Ada, and OO Lisp dialects, with disdain and even scorn: “expensive toys unfit for real problems.” C++ did three things to overcome this formidable barrier:

  It produced code with runtime and space characteristics that competed head-on with the perceived leader in that field: C. Anything that matched or beat C must be fast enough. Anything that didn’t could and would—out of need or mere prejudice—be ignored.
  It allowed such code to be integrated into conventional systems and produced on traditional systems. A conventional degree of portability, the ability to coexist with existing code, and the ability to coexist with traditional tools, such as debuggers and editors, were essential.
  It allowed a gradual transition to these new programming techniques. It takes time to learn new techniques. Companies simply cannot afford to have significant numbers of programmers unproductive while they are learning. Nor can they afford the cost of failed projects caused by programmers poorly trained and inexperienced in the new techniques failing by overenthusiastically misapplying ideas.

In other words, C++ made object-oriented programming and data abstraction cheap and accessible.

In succeeding, C++ didn’t just help itself and the C++ programmers. It also provided a major impetus to languages that provided different aspects of object-oriented programming and data abstraction. C++ wasn’t everything to all people and didn’t deliver on every promise ever made about some language or other. It did deliver on its own promises often enough to break down the wall of disbelief that stood in the way of all languages that allowed programmers to work at a higher level of abstraction.

6.8.2. Is C++ a Coherent Language?

C++ was successful in its own terms and is an effective vehicle for systems development, but is it a good language? Does C++ have an ecological niche now that the barriers of ignorance and prejudice against abstraction techniques have been broken?

Basically, I am happy with the language and quite a few users agree. There are many details I’d like to improve if I could, but the fundamental concept of a statically typed language using classes with virtual functions as the inheritance mechanism and facilities for low-level programming is sound.


Previous Table of Contents Next