What Functional features are worth a little OOP confusion for the benefits they bring?
- by bonomo
After learning functional programming in Haskell and F#, the OOP paradigm seems ass-backwards with classes, interfaces, objects. Which aspects of FP can I bring to work that my co-workers can understand? Are any FP styles worth talking to my boss about retraining my team so that we can use them?
Possible aspects of FP:
Immutability
Partial Application and Currying
First Class Functions (function pointers / Functional Objects / Strategy Pattern)
Lazy Evaluation (and Monads)
Pure Functions (no side effects)
Expressions (vs. Statements - each line of code produces a value instead of, or in addition to causing side effects)
Recursion
Pattern Matching
Is it a free-for-all where we can do whatever the programming language supports to the limit that language supports it? Or is there a better guideline?