The basic concepts of Functional Programming

Computer languages are primarily divided in categories on the basis programming paradigm supported. In software product development or in any large-scale scientific program module, the choice of language depends upon these programming paradigms which are used to decompose the objective of the program. These languages can be divided into Procedural programming language, Declarative language, Object-oriented language and Functional Programming language.


Contrary to popular programming concepts employed in commercial online software development processes, Functional Programming dissects a problem into a collection of functions. Rather than emphasizing on the change of state, Functional Programming uses functions to take input and produce the desired output. The origin of Functional Programming can be traced to Lambda Calculus, which was developed to work with recursion, function application and definition.

Functional Programming discourages functions that may modify the internal state or make any change invisible to the function’s returned value. These “pure functions” are immune to any change due to runtime effects and thus produce only the required output strictly at par with the given input.

Functional Programming has the following benefits:

In Functional Programming, it is easier to mathematically prove that a program is correct.
Functional Programming breaks the problem into modules. Thus, it is comparatively easy to write smaller functions rather using a large one. This ultimately reduces errors and increases readability.
Debugging process in Functional programs is simple since functions are well-specified and smaller in size.
It is easy to carry tests for functional programs as the functions are independent of the system state.
Functional programs are portable. The same function can be utilized in different purposes when used in a different collection.

Functional Programming languages are more preferred for scientific and academic purposes rather in project for commercial software and development of applications. However, certain Functional Programming languages like XSLT (XML), Ocaml, Haskell, Mathematica, Erlang etc. are employed in industrial and commercial applications. Also, SQL (Structured Query Language) and Spreadsheets use certain concepts of Functional Programming.

0 komentar:

Post a Comment

+