Blog Posts

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

The “Clash of Styles” Series – FP vs. OOP as a Daily Choice

The "Clash of Styles" series compare OOP and FP from a very practical standpoint. Modern general-purpose languages support both of the paradigms. Being conscious of that and choosing the right style for your use case is vital for ending up with an elegant and maintainable system.

Continue Reading

Clash of Styles, Part #6 – FP in OOP via the Visitor Pattern

The Visitor Pattern addresses a fundamental limitation of Object-Oriented modeling. In OOP, adding a new “operation” is tricky. You have to modify the existing classes, which is error-prone and violates OCP. Let’s look beyond the standard UML diagram and see how the Visitor solves this problem.

Continue Reading

Site Footer