Axiora Blogs
HomeBlogNewsAbout
Axiora Blogs
Axiora Labs Logo

Exploring the frontiers of Science, Technology, Engineering, and Mathematics. Developed by Axiora Labs.

Quick Links

  • Blog
  • News
  • About
  • Axiora Labs

Categories

  • Engineering
  • Mathematics
  • Science
  • Technology

Subscribe to our Newsletter

Get the latest articles and updates delivered straight to your inbox.

© 2026 Axiora Blogs. All Rights Reserved.

TwitterLinkedInInstagramFacebook

Technology

Object Oriented Programming VS Functional Programming

FKFadhila khan
Posted on December 28, 2025
10 views
Object Oriented Programming VS Functional Programming - Main image

Object Oriented Programming VS Functional Programming

When you begin to learn to code, you are concerned about syntax, Where is the semicolon? However, as you progress you discover it is not the task on how to write code that is challenging, but how to organize it.

This leads to the two prevailing philosophies (or paradigms) in software engineering Object-Oriented Programming (OOP) and Functional Programming (FP).

The two are quite different modes of thinking of how to solve a problem. One is not necessarily superior to the other, but they belong to other battlegrounds. We shall decompose the differences.

  1. Object-Oriented Programming (OOP) - The World of Nouns.

OOP is a representation of the software in the real world. It structures the code in containers called Objects and contains data (attributes) and actions that may manipulate the data (methods).

The Philosophy is everything is an Object. Think of a Car. It possesses attributes (color, speed) and functions (drive, brake), The key Concept is Encapsulation. The data is stored within the object and can be modified through procedures unique to the object. This guards the information against external interference. The State of OOP is based on Changeable State. You make an object, and you modify its values in the interior and at some point, car.speed = 0 turns into 60.

  • Advantages Easy to learn (object oriented thinking), good when dealing with big, complex systems that have many moving parts.
  • Disadvantages State control is a messy affair. Unless extra care is taken, bugs are difficult to trace when multiple components of your app attempt to make changes to the same object simultaneously. (eg: Java, C++, Python, CSH.)

2. Functional Programming (FP) - The World of Verbs.

FP is founded on mathematical functions. It views computation as the analysis of formulas and does not deal with changing-state and changing data.

The Philosophy is "Data and Behavior are independent of each other. You possess data, and you subject it to a series of functions to obtain an outcome. You do not say Car.drive, but you say drive(Car). The key Concept is Immutability. When you make data, you never amend it. In the case you wish to alter the speed of the car you do not update the old car object you simply create a new car object with the new speed. The State of FP is based on Pure Functions. The output of a given function only depends on its input. It does not produce any side effects (it does not modify anything external to itself).

  • Advantages Very predictable and easy to debug (since functions will never produce a different result). Parallel processing (because you never update data, you can always ignore the problem of threads competing over the data).
  • Disadvantages It has a stiffer learning curve. The idea of never changing variables is something unnatural to most beginners.
  • Popular Languages Haskell, Elixir, Scala (and more and more in JavaScript/React).

Blog content image

The Decision

  • Which of the Two Decisions to Study?

This was an inflexible split decades ago. Today, it’s a spectrum. Majority of the contemporary coding is a combination of the two. TOO You could also structure your architecture with OOP around the major parts of your system (suchource, User, Database, Service) but internally inside the parts, you could use FP to manipulate data in a safe and efficient way. Use OOP when you want to create a simulation, a graphical (interface) or a game where objects constantly interact. Use FP when you are creating a data processing pipeline or a high concurrency backend or when data consistency is important. The finest engineers do not choose to take a side; they study both and apply the appropriate instrument to the task.

Want to dive deeper?

Continue the conversation about this article with your favorite AI assistant.

Share This Article

Test Your Knowledge!

Click the button below to generate an AI-powered quiz based on this article.

Did you enjoy this article?

Show your appreciation by giving it a like!

Conversation (0)

Leave a Reply

Cite This Article

Generating...

You Might Also Like

The Theory of the Hydraulic Jump: Controlling Energy in Dam Design - Featured imageKRKanchana Rathnayake

The Theory of the Hydraulic Jump: Controlling Energy in Dam Design

01. Introduction When you look at a massive dam, you will often see water rushing down a spillway at...

Dec 31, 2025
0
From Raw Numbers to Clear Stories - A Simple Guide to Data Collection, Cleaning, and Visualization - Featured imageARAma Ransika

From Raw Numbers to Clear Stories - A Simple Guide to Data Collection, Cleaning, and Visualization

In today’s world, almost every decision we make can be improved with data. Whether it’s a doctor...

Jan 4, 2026
1
The AI PC Revolution - Hands on with Samsung’s Galaxy Book6 Pro & Ultra - Featured imageASAshen Shandeep

The AI PC Revolution - Hands on with Samsung’s Galaxy Book6 Pro & Ultra

The tech world is buzzing at CES 2026, and for good reason. Samsung has officially pulled the...

Jan 6, 2026
1