Saturday 8 December 2012

Functional Programming





Functional programming is a programming paradigm that treats calculations and computations as the evaluation of functions rather than state. 

Functional languages, I/O, assignments, etc., are completely avoided in this FP. In Python, however, we do not avoid them completely. Instead, a functional like interface is provided . For example, local variables are used inside the function, but global variables outside the function will not be modified. 


Functional programming can be regarded as the opposite of object-oriented programming. Objects are entities that provide functions to modify internal variables. Functional programming aims at the complete elimination of state, and works with the data flow between functions.

In Python, it is possible to combine object-oriented and functional programming. For example, functions could receive and return instances of objects.


Theoretical and practical advantages to the functional style:

1. Formal provability.
2. Modularity.
3. Composability.
4. Ease of debugging and testing.




[Expecting Your Valuable Comments]
Thank You


No comments:

Post a Comment