On Monday, 6 November 2017 at 10:10:29 UTC, Atila Neves wrote:
Checking for types at runtime is a code smell in OOP. Sometimes necessary, especially if doing multiple dispatch, but never done gladly. There's already a way to dispatch on type: virtual functions.Atila
More on that: https://www.tomdalling.com/blog/software-design/solid-class-design-the-liskov-substitution-principle/It often happens when people try to model sum types using polymorphism.
