Reusability

Reusability refers to the quality of a software component that is sufficiently general that it is independent of the current programming problem. Since it is independent it could in principle be used in a different program as well. But independence is not sufficient in order for a component to be reusable. It must be sufficiently easy to understand how to use the component so that writing a new one from scratch is simply not worthwhile. Among other things, a component with many competing purposes will be more difficult for maintainers to understand than will a single-purpose component. It follows, then, that the component should have a very specific purpose. This purpose can be to implement either a function or a type.

During the days of structured programming, the purpose of a components was always to perform a particular function. This method works reasonably well for numeric problems, mostly because the types of manipulated data are quite simple and standardized (integers, floats, complex numbers, and arrays of these).

In symbolic programming, however, the data objects tend to be much more complex than that. Typically, objects do not behave exactly the same way in two different applications. It is thus necessary to allow for parameters to adapt components to different applications. For this type of programming, it seems more appropriate to create components based on the type of the objects manipulated. Thus, a component would usually contain the definition of an object type and all the operations that are possible on objects of that type. Throughout this document, we are going to use the word ``module'' to refer to such a component. Modular programming is the key to reusability.

As far as reusability is concerned, the way a particular module was implemented does not have any impact. Only the interface of the module is needed in order to reuse it. Thus, reusability concerns only the way the module is presented to the outside world.