What shall we tell the children (about inheritance)?

  • Authors:
  • Andrew P. Black

  • Affiliations:
  • Portland State University

  • Venue:
  • Proceedings of the 5th Workshop on MechAnisms for SPEcialization, Generalization and inHerItance
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Since the groundbreaking work of Kamin, Reddy, and particularly Cook in the late 1980s, there has been broad agreement that the meaning of inheritance in object-oriented programming languages can be best explained using generator functions and their fixpoints. Consequently, it is a little surprising to realise that no current mainstream programming language actually explains inheritance to its users in this way. Instead, most languages make up a "story" that purports to explain inheritance, but that on closer inspection contains serious flaws. It is as if, being asked to explain the facts of life to our children, we are so embarrassed by the truth that we make up a story about storks, knowing even as we do so that it defies the laws not only of biology but also of physics. This paper explores both the truth and the fictions about how objects are brought into the world. My hope is that future programming languages can tell the children, if not the whole truth, then at least a partial truth that is consistent with the laws of mathematics.