Crystal Medium · Lesson 3

Abstract classes and overloads

Define an abstract base with abstract defs, keep shared logic in the parent, and overload methods by type restriction so the compiler picks the right one.

Lessons · Crystal Medium · Lesson 3 of 10

Abstract classes and overloads

Define an abstract base with abstract defs, keep shared logic in the parent, and overload methods by type restriction so the compiler picks the right one.

Illustration for Crystal
Define an abstract base with abstract defs, keep shared logic in the parent, and overload methods by type restriction so the compiler picks the right one.