C++ Language
Bjarne Stroustrup developed C++ in 1979 at Bell Labs as an enhancement to the C programming language and named it "C with Classes". In 1983 it was renamed to C++. Enhancements started with the addition of classes, followed by, among other features, virtual functions, operator overloading, multiple inheritance, templates, and exception handling.
In The Design and Evolution of C++ (1994), Bjarne Stroustrup describes some rules that he uses for the design of C++:
- C++ is designed to be a statically typed, general-purpose language that is as efficient and portable as C
- C++ is designed to directly and comprehensively support multiple programming styles (procedural programming, data abstraction, object-oriented programming, and generic programming)
- C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly
- C++ is designed to be as compatible with C as possible, therefore providing a smooth transition from C
- C++ avoids features that are platform specific or not general purpose
- C++ does not incur overhead for features that are not used (the "zero-overhead principle")
- C++ is designed to function without a sophisticated programming environment
Modern critics of the language raise several points. First, since C++ is based on and largely compatible with C, it inherits most of the criticisms leveled at that language. Taken as a whole, C++ has a large feature set, including all of C, plus a large set of its own additions, in part leading to criticisms of being a "bloated" and complicated language. Bjarne Stroustrup points out that resultant executables don't support these claims of bloat: "I have even seen the C++ version of the 'hello world' program smaller than the C version." The Embedded C++ standard was specified to deal with part of this, but it received criticism for leaving out useful parts of the language that incur no runtime penalty. Because of its large feature set, it can be quite difficult to fully master C++.
While C++ is more complex than some other programming languages, Bjarne Stroustrup points out that "The programming world is far more complex today than it was 30 years ago, and modern programming languages reflect that." The ISO standard of the C++ language is about 310 pages (excluding library). For comparison, the C programming language's is about 160 pages, even though it was designed more than 15 years prior and doesn't consider object-oriented programming.
Other criticism stems from what is missing from C++. For example, the current version of Standard C++ provides no language features to create multi-threaded software other than the volatile keyword. These facilities are present in some other languages including Java, Ada, and C#. It is possible to use operating system calls or third party libraries to do multi-threaded programming, but both approaches may create portability concerns.
C++ is also sometimes compared unfavorably with single-paradigm object-oriented languages such as Java, on the basis that it allows programmers to "mix and match" object-oriented and procedural programming, rather than strictly enforcing a single paradigm. This is part of a wider debate on the relative merits of the two programming styles.


Be The First One To Comment