Question Details

No question body available.

Tags

design architecture object-oriented functional-programming backend

Answers (1)

Accepted Answer Available
Accepted Answer
October 16, 2025 Score: 2 Rep: 220,779 Quality: High Completeness: 50%

Most contemporary programming languages allow to use different paradigms like OOP or functional programming. This alone is neither good nor bad per se. However, when those different styles are mixed completely arbitrarily in a single layer, that can be a design smell.

A program keeps usually more comprehensible when it uses one (and only one) style for a certain layer. Your question already makes a reasonable suggestion in which area you want to use what, so I don't see a big risk of making your system overcomplicated by mixing styles. Another well known design principle which uses two paradigms in conjunction (but in different layers) is known as functional core - imperative shell.

Said that, there is usually nothing wrong when certain member functions of a class are utilizing functional tools, or when a mostly modular layer makes uses of certain classes or implements a helper class. So this isn't necessarily a black-and-white decision.

In the end, what matters most is how your team thinks about it. When they (during your code reviews) think the specific mixture is acceptable, then go ahead, Otherwise, better rethink and maybe refactor the system.