Chapter 16

IM Prescriptions 10–20 Revisited

And now the fancy passes by, And nothing will remain

—A. E. Housman: A Shropshire Lad (1896)

Chapters 14 and 15 discussed the impact of multiple inheritance considerations on the first nine prescriptions of our inheritance model (though only for scalar types, of course). The present chapter completes the process by examining the remaining prescriptions, viz., IM Prescriptions 10-20. It’s convenient to treat these prescriptions in two batches—numbers 10-15 in the section immediately following, and numbers 16-20 in the next.

IM PRESCRIPTIONS 10 - 15

IM Prescriptions 10-15 still apply 100 percent, and quite frankly there isn’t much to say about them—but there is a little, as will be seen. Note: IM Prescriptions 10 and 11were originally discussed in Chapter 8; IM Prescriptions 12 and 13 were originally discussed in Chapter 9; and IM Prescriptions 14 and 15 were originally discussed in Chapter 10.

IM Prescription 10: Specialization by Constraint

The only point worth mentioning explicitly here is this: If type T′ is an immediate subtype for two or more regular types T1, T2, ..., Tm, then the type definition for type T′ will include a specification—actually an <is def>, in Tutorial D terms—of the form IS {T1,T2,...,Tm ...} (irrelevant details omitted),1 and that specification is both necessary and sufficient to define the required specialization constraints in their entirety. For example, the definition of type SQUARE includes the following: ...

Get Type Inheritance and Relational Theory now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.