Introduction to OOP Chapter 27: Implementation : next previous audio real text

Slicing Problem

The idea that a child can extend the data area of the parent also makes it difficult to support both the following goals
  1. The goal of keeping memory on the stack, which is laid out at compile time

  2. The goal of supporting the polymorphic variable, which can hold an instance of the child class at run time.

Most OO languages uphold (2) and abandon (1), C++ is an exception in that it upholds (1) and therefore abandons (2).

Intro OOP, Chapter 27, Slide 09