3 ms·
Why should you care about functional programming? Here are a few reasons: 1. It's different, especially from what it seems you're already doing. Therefore it
by tmoertel 13y ago
Why should you care about functional programming? Here are a few reasons:
1. It's different, especially from what it seems you're already doing. Therefore it is likely that if you do FP in earnest, you will learn new problem-solving techniques, many of which will prove useful elsewhere.
2. In FP, the abstraction and composition model – functions – scales down farther than do objects, modules, or compilation units. That is, functions remain practical in smaller places where objects or modules would be too expensive to insert, syntactically or semantically. In FP languages, then, you can use abstraction and composition even within the "leaves" of your logic, and that's where the bulk of your code actually lives.
3. Functions have a mathematical basis that you can draw on for intuition. In some FP languages, the mathematical parallels are so reliable that you can even calculate the code you need. Calculation can work in places where main force of intellect and the search for "aha! moments" fail.
There you go, three reasons: it's different, it not only scales up but down, and it comes with useful theory.