Apply Polymorphism

Use when behavior varies based on type — especially when if/switch statements check the type of an object to decide what to do, or when adding a new variant requires editing an existing class.

jeffreytse Updated
grimoire

File contents

jeffreytse/grimoire-core commit d8c2b5be6d

Frequently asked questions

npx get-skill add jeffreytse/apply-polymorphism