Polymorphism on Steroids – Dive Into Multiple Dispatch (Multimethods)

The common understanding of Polymorphism takes into account only the runtime type of the “receiving” object. That’s the implementation in most languages. But what if we also consider the method arguments as part of the runtime method resolution logic? That’s the idea behind “Multiple Dispatch.”

Continue Reading

Clash of Styles, Part #5 – Double Dispatch, or When to Abandon OOP

OOP is established to the point that we sometimes follow absurdly complicated “idiomatic” patterns(tricks). One example is the Double Dispatch technique, which is a quite puzzling chain of polymorphic calls. Let’s see it in action and compare it to a quite elegant Functional alternative.

Continue Reading

Site Footer