Tutorial: Advanced C++ programming styles: using C++ as a higher-level language

J. Coplien
DOI: https://doi.org/10.1109/TOOLS.1997.713575
1997-09-01
Abstract:Is C++ a high-level or low-level language? It depends how you use it! This seminar will introduce programming techniques that raise the level of C++ programming, both by freeing the programmer from common administrative details, and by modeling some of the powerful semantics of high-end object-oriented programming languages. The seminar goes beyond the limits of most C++ texts and introductory courses to present programming styles that increase the leverage of the accomplished C++ programmer who is looking to expand their horizons. Drawing from the book Advanced C++ Programming Styles and Idioms, and taught by the book‘s author, the seminar tackles difficult but common problems faced by developers of C++ systems, both large and small. The seminar starts by showing the pitfalls of a simple class design and how overloaded assignment and copy constructors alleviate some common problems. Building on that base, the course explores assorted programming styles useful for resolving other common, though more subtle, programming problems: * Counted pointers: how to allocate objects from the heap without having to explicitly free them when their pointer goes out of scope * Exemplars: objects that take over some of the roles of C++ classes to provide the equivalent of the “virtual constructors” 0 Generic exemplars: a way of using exemplars that isolates the impact of adding new classes to a system in a way that class inheritance alone doesn’t address * Multi-methods: when you want a member function to be selected according to the types of multiple arguments (unlike virtual functions, which select a function only according to the type of the object for which they are called) This course is for the C++ programmer with at least a year of experience in C++ or another object-oriented programming language.
Computer Science
What problem does this paper attempt to address?