|Ada 95 Quality and Style Guide||Chapter 8|
8.4.4 Part Families
Create families of generic or other parts with similar specifications.
The Booch parts (Booch 1987) are an example of the application of this guideline.
Different versions of similar parts (e.g., bounded versus unbounded stacks) may be needed for different applications or to change the properties of a given application. Often, the different behaviors required by these versions cannot be obtained using generic parameters. Providing a family of parts with similar specifications makes it easy for the programmer to select the appropriate one for the current application or to substitute a different one if the needs of the application change.
A reusable part that is structured from subparts that are members of part families is particularly easy to tailor to the needs of a given application by substitution of family members.
Guideline 9.2.4 discusses the use of tagged types in building different versions of similar parts (i.e., common interface, multiple implementations).
|< Previous Page||Search||Contents||Index||Next Page >|