concept OOP in category c#
appears as: OOP

This is an excerpt from Manning's book Functional Programming in C#: How to write better C# code.
A multi-paradigm approach— They say that if the only tool you have is a hammer, every problem will look like a nail. Conversely, the more angles from which you can view a given problem, the more likely it is that you’ll find an optimal solution. If you’re already proficient in OOP, learning a different paradigm such as FP will inevitably give you a richer perspective. When faced with a problem, you’ll be able to consider several approaches and pick the most effective.
Structuring a complex, real-world application is no easy task. There are entire books written on the subject, so this chapter by no means aims to provide a comprehensive view. We’ll focus on the techniques that you can use to modularize and compose an application consisting entirely of functions, and how the result compares to how this is usually done in OOP.
Modularity in OOP is usually obtained by assigning responsibilities to different objects, and capturing these responsibilities with interfaces. For instance, we might define an IValidator interface for validation and an IRepository for persistence.