diffrence
| Functional Programming | Object Oriented Programming |
|---|---|
| This programming paradigm is based on object oriented concept. Classes are used where instance of objects are created | |
| Fundamental elements used are variables and functions. The data in the functions are immutable(cannot be changed after creation). | Fundamental elements used are objects and methods and the data used here are mutable data. |
| Importance is not given to data but to functions. | Importance is given to data rather than procedures. |
| It follows declarative programming model. | It follows imperative programming model. |
| It uses recursion for iteration. | It uses loops for iteration. |
| It is parallel programming supported. | It does not support parallel programming. |
| The statements in this programming paradigm does not need to follow a particular order while execution. | The statements in this programming paradigm need to follow an order i.e., bottom up approach while execution. |
| Does not have any access specifier. | Has three access specifiers namely, Public, Private and Protected. |
| To add new data and functions is not so easy. | Provides an easy way to add new data and functions. |
| No data hiding is possible. Hence, Security is not possible. | Provides data hiding. Hence, secured programs are possible. |
Advantages of closuresHere are some advantages of closures:
NPM & NPX NPM= अगर permanent package को downloads करना होता है तो NPM का use होता है NPX= अगर packageको one time use करना है तो npx use करते है और ज्यादातर npxका ही use होता है | |
|---|---|
Comments
Post a Comment