The advantages of FP are significant:
- Verification: There is a close correspondence between the reasoning that justifies the correctness of a program and the program itself. Principles of proof by induction go hand-in-hand with the programming technique of recursion.
- Parallelism: Evaluation of compound expressions is naturally parallel in that the values of sub-expressions may be determined simultaneously without fear of interference or conflict among them. This gives rise to the central concepts of the work (sequential) and span (idealized parallel) complexity of a program, and allows programs to exploit available parallelism without fear of disrupting their correctness.
- Abstraction: FP stresses data-centric computation, with operations that act on compound data structures as whole, rather than via item-by-item processing. More generally, FP emphasizes the isolation of abstract types that clearly separate implementation from interface. Types are used to express and enforce abstraction boundaries, greatly enhancing maintainability of programs, and facilitating team development.
Moreover, FP generalizes IP by treating commands as forms of data that may be executed for their effects on the environment in which they occur.
Source: http://www.cs.cmu.edu/~15150/
No comments:
Post a Comment