Use of C++
C++ is used by hundreds of thousands of programmers in essentially every application domain. This use is
supported by about a dozen independent implementations, hundreds of libraries, hundreds of textbooks,
several technical journals, many conferences, and innumerable consultants. Training and education at a
variety of levels are widely available.
Early applications tended to have a strong systems programming flavor. For example, several major
operating systems have been written in C++ [Campbell,1987] [Rozier,1988] [Hamilton,1993] [Berg,1995]
[Parrington,1995] and many more have key parts done in C++. C++ was designed so that every language
feature is usable in code under severe time and space constraints [Stroustrup,1994]. This allows C++ to be
used for device drivers and other software that rely on direct manipulation of hardware under real-time constraints.
In such code, predictability of performance is at least as important as raw speed. Often, so is compactness
of the resulting system.
Most applications have sections of code that are critical for acceptable performance. However, the largest
amount of code is not in such sections. For most code, maintainability, ease of extension, and ease of
testing is key. C++’s support for these concerns has led to its widespread use where reliability is a must and
in areas where requirements change significantly over time. Examples are banking, trading, insurance,
telecommunications, and military applications. For years, the central control of the U.S. long-distance telephone
system has relied on C++ and every 800 call (that is, a call paid for by the called party) has been
routed by a C++ program [Kamath,1993]. Many such applications are large and long-lived. As a result,
stability, compatibility, and scalability have been constant concerns in the development of C++. Millionline
C++ programs are not uncommon.
Like C, C++ wasn’t specifically designed with numerical computation in mind. However, much numerical,
scientific, and engineering computation is done in C++. A major reason for this is that traditional
numerical work must often be combined with graphics and with computations relying on data structures
that don’t fit into the traditional Fortran mold [Budge,1992] [Barton,1994]. Graphics and user interfaces
are areas in which C++ is heavily used.
All of this points to what may be C++’s greatest strength: its ability to be used effectively for applications
that require work in a variety of application areas. It is quite common to find an application that
involves local and wide-area networking, numerics, graphics, user interaction, and database access. Traditionally,
such application areas have been considered distinct, and they have most often been served by distinct
technical communities using a variety of programming languages. However, C++ has been widely
used in all of those areas. Furthermore, it is able to coexist with code fragments and programs written in
other languages.
C++ is widely used for teaching and research. This has surprised some who – correctly – point out that
C++ isn’t the smallest or cleanest language ever designed. However, C++ is
– clean enough for successful teaching of basic concepts,
– realistic, efficient, and flexible enough for demanding projects,
– available enough for organizations and collaborations relying on diverse development and execution
environments,
– comprehensive enough to be a vehicle for teaching advanced concepts and techniques, and
– commercial enough to be a vehicle for putting what is learned into non-academic use.
Thanks to the ISO standards process (§2), C++ is also well-specified, stable, and supported by a standard library.