Chapter 6

Scalar Values with Inheritance

The tragedy of the commons

—William Forster Lloyd (attrib.):Two Lectures on the Checks to Population (1833)

The scalar value concept needs some extension if type inheritance is supported, basically because such values are no longer limited to being of just one type. As we’ll see, IM Prescription 8 addresses this issue, though it does so in a rather roundabout way. In particular, that prescription has the important consequence that every scalar value has exactly one most specific type. Of course, we already know this—I mean, we already know that scalar values always have a unique most specific type, at least in the single inheritance context—because it’s a logical consequence of the disjointness assumption (see Chapter 3). However, the fact that this same state of affairs holds as a logical consequence of IM Prescription 8 as well is more significant, in a way, because the disjointness assumption applies only to single inheritance, while IM Prescription 8 applies to multiple inheritance as well as single.

That said, I won’t attempt to prove my claim in this chapter (my claim, that is, that the uniqueness of most specific types is a logical consequence of IM Prescription 8); instead, I’ll defer that proof to Chapter 15, where I’ll show that the claim does hold for multiple inheritance and hence for single as well, a fortiori. (As a matter of fact, it holds for tuple and relation inheritance too, as we’ll see in Part IV of this book. But first ...

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.