Science of C++ Programming
Meng H. Lee, Alexander A. Stepanov · 1994
purposeof this talk is to demonstrate that to transform programming from an art into a science, it is necessary to develop a systemof fundamental laws that govern the behavior of software components. We start with a set of axioms that describe the relationships between constructors, assignment and equality, and showthat without them even the most basic routines would not work correctly. After briefly describing our object model and introducing a notion of a nice or well-behaved class, we proceed to show that similar axi.. oms describe the semantics of iterators, or generalized pointers, and allow one to build generic algorithms for such iterators. c++ is a powerful enough language-the first such languaae in our experience.....to allow the construction of generic programming components that combine mathematical precision, beauty and abstractness with the efficiency of noneaerlc band.crafted code. We maintain that the development of such components must be based on a solid theoretical foundation. Thescience of C++ progrMVning 2 FG'I HEWLETT .:'~ PACKARD The labours ofothers, have raise for us an immense reservoir of important facts. We merely lay them on, and communicate them, in a clear and gentle