Functional Programming Benefits
The renewed interest in functional programming by the mainstream programming community is due in part to the emergent properties of the functional paradigm that are well-suited to address the challenges presented by the industry's shift towards multicore. However, the primary reason why you should know and understand functional programming is that it can greatly improve the quality of the code you write in other contexts.
Mastery of the functional programming paradigm can lead to a higher degree of referential transparency in your designs. Referential transparency is a desirable property that ensures functions consistently yield the same results given the same input, irrespective of when and where they are invoked. This property is beneficial as function evaluation depends less on the side effects of mutable state. In imperative code, mutable variables are a leading cause of defects, and designs that employ inordinate mutability can be problematic.
While introductions to object orientation often promote designs that employ mutability, with astute test-driven design, unnecessary mutability can be eliminated. This results in a design that has better responsibility allocation with more numerous, smaller functions that act on arguments passed into them rather than referencing mutable member variables. As a result, there are fewer defects, and they are often simpler to debug, making it easier to locate where a rogue value is introduced.
Recommended by LinkedIn
Learning a functional programming language can help you internalize these ideas and improve your mastery of the functional programming paradigm. While this approach may not be optimal in all situations, mastering functional programming can help you judiciously apply the lessons learned to other domains. This can lead to object systems that resonate with referential transparency goodness and are closer to their functional counterparts than many believe. Some even assert that functional programming and object orientation are a reflection of each other, a form of computational yin and yang at their apex.