📜 ⬆️ ⬇️

What is wrong with OOP and OP

I do not understand the reason for the existence of endless disputes about Object Oriented (OOP) and Functional (OP) programming. It seems that this kind of things are beyond human understanding, and you can argue about them endlessly. For many years, studying the programming languages, I saw a clear answer, and often I find it pointless to discuss these issues.

In short, both the PLO and the FI are ineffective when it comes to extreme use. Extreme in the PLO is the idea that “anything is an object” (pure OP). The extreme for FP can be considered pure functional programming languages.

What's wrong with OOP


“” - . , “ — ”. , :

, . .

, Python Scala . Python __call__ . Scala, — apply. , , . , , . , __call__ apply, “ ”. Python Scala , “”, __call__ apply, “”. , , , , “ ”.

- . Java, . , “”, , , . , "​​ " Java. , .


, , , . , . , «What is a Purely Functional Language» Amr Sabry ( PhD). , , :

, . .

, - , ( , , ). - , “ ” . . — . , . , . , ? Haskell.

, . , , . “ ” Java. , Haskell? “ ----”. , Amr Sabry ( PhD) - . miniKanren , , . , , Haskell. , , Amr Sabry, , . , , - . , Scheme.

, , “” . , ? , . , , . , , . . , , , , . , , :

int f(int x) {
    int y = 0;
    int z = 0;
    y = 2 * x;
    z = y + 1;
    return z / 3;
} 

. - , . , , .

, , . , , . . “ ”. . “ ”, , , ! “Function and concept”, , , . , , , . , .


- , . , , , , . , . , .

. .

')

Source: https://habr.com/ru/post/201874/


All Articles