Basis For Comparison | Functional Programming | OOP |
Definition | Functional programming emphasizes an evaluation of functions. | Object-oriented programming is based on the concept of objects. |
Data | Functional programming uses immutable data. | Object-oriented uses mutable data. |
Model | Functional programming does follow a declarative programming model. | Object-oriented programming does follow an imperative programming model. |
Support | Functional Programming supports parallel programming. | Object-oriented programming does not support parallel programming. |
Execution | In Functional programming, the statements can be executed in any order. | In OOPs, the statements should be executed in a particular order. |
Iteration | In Functional programming, recursion is used for iterative data. | People use loops for iterative data in OOP. |
Element | The basic elements of functional programming are Variables and Functions. | The essential elements of object-oriented programming are objects and methods. |
Use | People use functional programming only when they have few things with more operations. | People use object-oriented programming when they have many things with few operations. |
No comments:
Post a Comment