Chapter 5

Basic Definitions

A definition is the enclosing [of] a wilderness of idea within a wall of words.

—Samuel Butler:Notebooks (1912)

I hate definitions.

—Benjamin Disraeli:Vivian Grey (1826)

For convenience I repeat below in Fig. 5.1 the sample type hierarchy from the section “The Running Example” in Chapter 3.

image

Fig. 5.1 (same as Fig. 3.1): Example of a type hierarchy

The rest of this chapter considers the first seven IM prescriptions, using Fig. 5.1 as a basis for examples. Let me remind you from Chapter 3 that, in an attempt to avoid confusion, throughout this book I refer to prescriptions of the Manifesto as such as “TTM prescriptions” and prescriptions of our inheritance model as “IM prescriptions.” Let me also repeat the following from the preamble to Chapter 4:

Throughout this chapter, as well as elsewhere in this book, I use the symbols T and T′ as generic names for a pair of types such that T′ is a subtype of T (equivalently, such that T is a supertype of T′). You might find it helpful to think of T and T′ as ELLIPSE and CIRCLE, respectively; however, keep in mind that they’re not limited to being scalar types specifically, barring explicit statements to the contrary (moreover, the various prescriptions are all worded in such a way as not to be limited to single inheritance only, either). Note too that distinct types have distinct names; in particular, if T′ is a ...

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.