Understanding Code Reusability: Experience with C and C++

CS-TR-93-12

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


Despite nearly three decades of study in the area of code reusability, programmers are still writing code that they will not be able to use again. In this paper, we examine a set of C and C++ programming language features usually considered to be relevant to code reuse: functions, defined types, macros, composition, generics, overloaded functions and operators, and polymorphism. Our goal is to determine exactly how each of these features should be used to produce more reusable code, and so develop an understanding of the nature of reusability. We also discuss common misunderstandings of some of these programming language features and, in doing so, provide some practical advice for more effective programming.

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