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

Clash of Styles, Part #4 – Adding Support for Rational Numbers with FP

FP or OOP is not a binary choice. You can have a healthy mix of the two in your program. Whatever paradigm you select to be central to your design, there will be cases when the other style fits better. Let’s start exploring this in Part #4 of the Clash of Styles series.

Continue Reading

Clash of Styles, Part #3 – Extensibility via OOP and FP

The choice between FP and OOP can directly affect the maintainability characteristics of your program. What is “easy” to add in OOP is “hard” in FP and vice versa. How can that be presented in terms of the Open-Closed Principle? What are some practical examples? Explore those topics in Part #3 of the Clash of Styles series.

Continue Reading

Clash of Styles, Part #2 – Operations Matrix via FP

How do we "interpret" our requirements with a Functional Programming mindset? How does it encourage us to decompose our program in terms of Operations? How is that precisely the opposite of the OOP perspective? Learn about it in the second part of the "Clash of Styles" series. Examples in C# and F#

Continue Reading

Site Footer