A
A
Alexander Pikeev2020-07-14 20:50:29
OOP
Alexander Pikeev, 2020-07-14 20:50:29

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

4 answer(s)
D
Dr. Bacon, 2020-07-14
@bacon

Really

D
Dmitry, 2020-07-14
@dimoff66

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.

X
xmoonlight, 2020-07-14
@xmoonlight

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 question

Ask a Question

731 491 924 answers to any question