Chapter 15

IM Prescriptions 8–9 Revisited

Let no one enter who is ignorant of geometry.

—Plato (c. 400 BCE)

There is no royal road to geometry.

—Euclid (c. 300 BCE)

As we know from Chapter 3, the disjointness assumption has the important consequence that every value has a unique most specific type. With multiple inheritance, however, that assumption no longer holds, and so the question is: Does that same property hold with multiple inheritance anyway?—i.e., is it still true with multiple inheritance that every value has a unique most specific type? In fact the answer to this question is yes, thanks to IM Prescription 8.1 This chapter examines this issue, as well as several related issues.

First, however, let me make a preliminary point. The text of IM Prescription 8 begins thus:

Let T1, T2, ..., Tm (m ≥ 0) ... be scalar types.

Clearly, we can assume without loss of generality that types T1, T2, ..., Tm are all distinct. Moreover, we can also assume, thanks to the noninclusion requirement of IM Prescription 7 (see Chapter 14) that no two distinct types Ti and Tj (1 ≤ i, jm; ij), neither of which is a subtype of the other, are such that the set of values |Ti| constituting Ti is a subset of the set of values |Tj| constituting Tj. I’ll rely on these two assumptions (sometimes just tacitly) throughout this chapter.

LEAST SPECIFIC COMMON SUBTYPES

To repeat, it’s my claim that the property that most specific types are unique follows from IM Prescription 8. More specifically, I claim ...

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.