|Ada 95 Quality and Style Guide||Chapter 9|
9.2 TAGGED TYPE HIERARCHIES
You should use inheritance primarily as a mechanism for implementing
a class hierarchy from an object-oriented design. A
class hierarchy should be a generalization/specialization ("is-a")
relationship. This relationship may also be referred to as "is-a-kind-of,"
not to be confused with "is an instance of." This "is-a"
usage of inheritance is in contrast to other languages in which
inheritance is used also to provide the equivalent of the Ada
context clauses with and use. In Ada, you first
identify the external modules of interest via with clauses
and then choose selectively whether to make only the name of the
module (package) visible or its contents (via a use clause).
< Previous Page
Next Page > 1