How to Reuse Code, Really: A Guide to Creating Reusable Code with C++


Authors: Peter Andreae, Robert Biddle, Ewan Tempero
Source: GZipped PostScript (79kb); Adobe PDF (313kb)

Note: Superseded by CS-TR-93-12

Despite nearly three decades of study in the area of code reuse programmers are still writing code that they and others have written many times before. In this paper, we examine a set of programming language features that are generally accepted as necessary to providing effective reuse of software. The set of features includes macros, procedures and functions, inheritance, polymorphism, overloaded functions and operators, and templates. Our goal is to determine exactly how each of these features benefit the production of code. This will enable us to extract general principles that can be used as guidelines for developing software more suited to reuse. We also discuss common misunderstandings of some of these programming language features and, in doing so, provide some practical hints on how to effectively use these features.

[Up to Computer Science Technical Report Archive: Home Page]