Why C++ is not just an Object-Oriented Programming Language
📜 Abstract
C++ directly supports a variety of programming styles. In this, C++ deliberately differs from languages designed to support a single way of writing programs. This paper briefly presents key programming styles directly supported by C++ and argues that the support for multiple styles is one of its major strengths. The styles presented include: traditional C-style, concrete classes, abstract classes, traditional class hierarchies, abstract classes and class hierarchies, and generic programming. To provide a context for this overview, I discuss criteria for a reasonable and useful definition of ‘‘object-oriented programming.’’
✨ Summary
The paper argues that C++ should be understood as a multi-paradigm language rather than as a language restricted to a single, “pure” object-oriented style. It defines object-oriented programming in practical terms as direct support for abstraction through classes and objects, inheritance, and run-time polymorphism. It then presents a broader set of C++ techniques, including concrete types, namespaces, abstract interfaces, class hierarchies, and generic programming. The central design principle is to represent concepts and relationships directly, efficiently, and affordably, while preserving static type safety, interoperability with other languages, and run-time performance. (stroustrup.com)
The paper’s continuing influence is primarily visible in C++ education, language documentation, and historical accounts of the language. The official ISO C++ FAQ explicitly directs readers to this paper to explain why writing exclusively “pure” object-oriented code is not a C++ ideal. (isocpp.org) A later historical account by Stroustrup repeats the paper’s characterization of C++ as a multi-paradigm language and cites the paper when discussing C++ programming styles. (nzdr.ru) The paper is also widely cataloged and cited as part of the literature surrounding C++ generic programming and the Standard Template Library, although the sources located do not establish a measurable causal effect on a particular subsequent research result or industrial system. (dblp.uni-trier.de)