Wednesday, December 20, 2023

Functional Programming and OOP Comparison Table

 

Basis For ComparisonFunctional ProgrammingOOP
DefinitionFunctional programming emphasizes an evaluation of functions.Object-oriented programming is based on the concept of objects.
DataFunctional programming uses immutable data.Object-oriented uses mutable data.
ModelFunctional programming does follow a declarative programming model.Object-oriented programming does follow an imperative programming model.
SupportFunctional Programming supports parallel programming.Object-oriented programming does not support parallel programming.
ExecutionIn Functional programming, the statements can be executed in any order.In OOPs, the statements should be executed in a particular order.
IterationIn Functional programming, recursion is used for iterative data.People use loops for iterative data in OOP.
ElementThe basic elements of functional programming are Variables and Functions.The essential elements of object-oriented programming are objects and methods.
UsePeople 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