+ 3

Functional and oop programing difference

I always confuse with these words. Could you explain them with examples

30th Oct 2021, 5:17 AM
Dawit Teshager
Dawit Teshager - avatar
2 RĂ©ponses
+ 11
✧ Object Oriented Programming (oop) ✧ ◉ This programming paradigm is based on object oriented concept. Classes are used where instance of objects are created ◉ Fundamental elements used are objects and methods and the data used here are mutable data. ◉ Importance is given to data rather than procedures. ◉ It follows imperative programming model. ◉ It uses loops for iteration. ◉ It does not support parallel programming. ◉ in this programming paradigm need to follow a order i.e., bottom up approach while execution. ◉ Has three access specifiers namely, Public, Private and Protected. ◉ Provides and easy way to add new data and functions. ◉ Provides data hiding. Hense, secured programs are possible.
30th Oct 2021, 5:44 AM
Sujal
Sujal - avatar
+ 8
✧ Functional Programming ✧ ◉ This programming paradigm emphasizes on the use of functions where each function performs a specific task. ◉ Fundamental elements used are variables and functions.The data in the functions are immutable(cannot be changed after creation). ◉ Importance is not given to data but to functions. ◉ It follows declarative programming model. ◉ It uses recursion for iteration. ◉ It is parallel programming supported. ◉ The statements in this programming paradigm does not need to follow a particular order while execution. ◉ Does not have any access specifier. ◉ To add new data and functions is not so easy. ◉ No data hiding is possible. Hence, Security is not possible.
30th Oct 2021, 5:41 AM
Sujal
Sujal - avatar