Introduction to OOP Chapter 12: Implications of substitution: next previous audio real text

The Slicing Problem

The problem is you are trying to take a large box and squeeze it into a small space. Clearly this won't work. Thus, the extra fields are simply sliced off.

Question - Does this matter?

Answer - Only if somebody notices.

Solution - Design the language to make it difficult to notice.

Intro OOP, Chapter 12, Slide 08