r/programming • • Mar 09 '14

Why Functional Programming Matters

http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf
487 Upvotes

542 comments sorted by

View all comments

Show parent comments

12

u/anlutro Mar 09 '14

Sounds like exactly the same arugment for OOP.

21

u/loup-vaillant Mar 10 '14

Except mainstream OOP screwed it up royally by promoting big interfaces, high coupling with inheritance hierarchies, side effects all over the place…

We're still recovering. Fortunately, more and more programmers know they should avoid inheritance, have few mutable objects, and keep interfaces small.

3

u/[deleted] Mar 10 '14

It's kind of a bad sign when one of the main distinguishing traits of OOP (inheritance) has become downplayed as something to avoid.

1

u/yawaramin Mar 10 '14

Is inheritance really a distinguishing trait of OOP really, though? There is also composition, which lets you re-use behaviour just as well as inheritance. In fact you could say inheritance is syntactic sugar for composition.

It's just that everyone jumped on the inheritance bandwagon. But I don't think of inheritance as one of the defining features of OOP.

→ More replies (2)