Answer the question
In order to leave comments, you need to log in
Is it possible to code in OOP style, and at the same time "switch" to FP?
I have read a lot about how to write in a functional style, you need to completely reshape your thinking. Is it possible to write "correct, clean" code simultaneously using two paradigms?
Answer the question
In order to leave comments, you need to log in
OOP is object-oriented programming, that is, encapsulating methods for working with a certain entity within a class and providing an external interface.
FP is immutability
And I don't see how the first contradicts the second.
The wrong approach is to use any imposed paradigms from the outside that do not correspond to the problem being solved.
The correct one is to use an adaptive single storage: an object-associative hierarchical model of stored values and methods.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question