Saturday, October 10, 2015

What is the benefit for functional programming

Functional programming produces programs by composing mathematical functions and avoids shared state & mutable data.

Functional programming has one big advantage: it avoids (on conceptual level) 'states' during the runtime. Thus, the value of a term is always predetermined by the input. Lack of mutation makes it easier for parallel programming.

Functional programming makes the code more readable. Higher-order constructs enable you to write programs more concisely (not writing the same loop over and over again)

Functional programming naturally creates more modular programs, permitting programmers to reuse more effectively about their programs. As function is the first class citizen, more single purpose functions are created.

No comments:

Post a Comment