The Wayback Machine - https://web.archive.org/web/20240703195043/https://www.geeksforgeeks.org/difference-between-functional-programming-and-object-oriented-programming/
Open In App

Difference between Functional Programming and Object Oriented Programming

Last Updated : 12 May, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

A programming paradigm is a style, or “way, ” of programming. Programming paradigms differ from one another based on the features and the style they support. There are several features that determine a programming paradigm such as modularity, objects, interrupts or events, control flow etc. Every programming paradigm has its own advantage so, it better to know where to use it before actually using it. According to the answer given in stack overflow, Object-oriented languages are good when you have a fixed set of operations on things, and as your code evolves, you primarily add new things. This can be accomplished by adding new classes which implement existing methods, and the existing classes are left alone. Functional languages are good when you have a fixed set of things, and as your code evolves, you primarily add new operations on existing things. This can be accomplished by adding new functions which compute with existing data types, and the existing functions are left alone. It is also possible to use both the programming paradigms according to our own need. As we have got languages like python, java, etc that supports both object oriented concept and are also functional by supporting various inbuilt functions. Functional Programming vs Object Oriented Programming

Functional Programming Object Oriented Programming
This programming paradigm emphasizes on the use of functions where each function performs a specific task. 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.


Similar Reads

Difference between Function Oriented Design and Object Oriented Design
1. Function Oriented Design : Function oriented design is the result of focusing attention to the function of the program. This is based on the stepwise refinement. Stepwise refinement is based on the iterative procedural decomposition. Stepwise refinement is a top-down strategy where a program is refined as a hierarchy of increasing levels of deta
3 min read
Difference Between Object-Oriented Testing and Agent-Oriented Testing
Agent-oriented Testing is defined as the application of agents like software or intelligent or multi-agent systems, etc. to software testing problems by tackling and automating complex testing tasks. This testing is considered an extension of the object-oriented testing process. There is a growing need for agent-oriented systems to tackle complex p
3 min read
Functional Modelling in object oriented analysis and design
Functional Modelling: A functional model of a system specifies how the output values are computed in the system from the input values, without considering the control aspects of the computation.This represents the functional view of the system - the mapping from inputs to outputs and the various steps involved in the mapping.The functional model of
3 min read
Difference between Row oriented and Column oriented data stores in DBMS
Row-oriented and column-oriented data stores are two different approaches to storing and organizing data in relational database management systems (RDBMS). Row-Oriented Database work by organizing the data into rows and Column-Oriented Databases work by organizing the data into columns. Row-Oriented DatabaseIn a row-oriented data store, data is sto
4 min read
Difference between Structured Programming and Object Oriented Programming
1. Structured Programming :Structured Programming, as name suggests, is a technique that is considered as precursor to OOP and usually consists of well-structured and separated modules. In this programming, user can create its own user-defined functions as well as this methodology tries to resolve issues that are associated with unconditional trans
3 min read
Differences between Functional and Non-functional Testing
What is Functional Testing?Functional testing is a type of software testing in which the system is tested against the functional requirements and specifications. Functional testing ensures that the requirements or specifications are properly satisfied by the application. This type of testing is particularly concerned with the result of processing.
2 min read
Differences between Procedural and Object Oriented Programming
This article focuses on discussing the differences between procedural and object-oriented programming. Procedural Programming Procedural Programming can be defined as a programming model which is derived from structured programming, based upon the concept of calling procedure. Procedures, also known as routines, subroutines or functions, simply con
2 min read
Difference between Structured and Object-Oriented Analysis
Analysis simple means to study or examine the structure of something, elements, and system requirements in detail, and methodical way. Structured analysis and Object-oriented analysis both are important for software development and are analysis techniques used in software engineering. But both are different from each other. Structured Analysis and
5 min read
Difference Between Object-Oriented Testing and Conventional Testing
Conventional testing is a software testing process that is conducted when the waterfall life cycle is used while developing software. This testing is always performed during the test phase of the software development life cycle, which usually follows the development phase, and after that, it proceeds to the implementation phase. During this testing
3 min read
Design Goals and Principles of Object Oriented Programming
The fundamental goal of dealing with the complexity of building modern software naturally gives rise to several sub-goals. These sub-goals are directed at the production of quality software, including good implementations of data structures and algorithms. The article focuses on discussing design goals and principles of Object Oriented Programming.
13 min read
three90RightbarBannerImg