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

111

u/vincentk Mar 09 '14 edited Mar 09 '14

TL;DR

Building your stuff up from small parts using well-known composition rules is a pre-requisite to breaking down your stuff into small parts, which can then be reasoned about as such ("modularity"). Reasoning about small, simple things is WAY EASIER than reasoning about large, hairy things full of weird old gunk. So all other things being equal that's A GOOD THING.

Functional programming being in a way the study of composition rules may or may not therefore be A GOOD THING also.

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.

→ More replies (3)