VOOZH about

URL: https://www.geeksforgeeks.org/system-design/introduction-of-programming-paradigms/

⇱ Introduction of Programming Paradigms - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Introduction of Programming Paradigms

Last Updated : 3 Jun, 2026

A programming paradigm is a method or style of solving problems using a programming language. It provides a structured approach and set of principles that guide how programs are designed and implemented.

  • Different programming paradigms use different techniques and strategies to solve software development problems efficiently.
  • A programming language may support one or more paradigms, allowing developers to choose the best approach based on project requirements.

Apart from the variety of programming languages available, there are several paradigms that address different demands and challenges in software development. These paradigms are discussed below

👁 2056958132

1. Imperative Programming Paradigm

Imperative programming is one of the oldest programming paradigms and is closely related to machine architecture and Von Neumann architecture. It works by changing the program state through assignment statements and executes tasks step-by-step to achieve the desired result.

Advantages

  • Simple and easy to understand and implement.
  • Supports programming constructs like variables, loops, and conditions.

Disadvantages

  • Complex problems become difficult to manage and maintain.
  • Less efficient for large-scale and parallel programming applications.

Examples of Imperative programming paradigm:

  • C: developed by Dennis Ritchie and Ken Thompson
  • Fortran: developed by John Backus for IBM
  • Basic: developed by John G Kemeny and Thomas E Kurtz

Output
Average of five numbers: 24.2

Imperative programming is divided into three broad categories: Procedural, OOP and parallel processing. These paradigms are as follows:

1. Procedural programming paradigm: This paradigm emphasizes on procedure in terms of under lying machine model. There is no difference in between procedural and imperative approach. It has the ability to reuse the code and it was boon at that time when it was in use because of its reusability.

Examples of Procedural programming paradigm:

  • C: developed by Dennis Ritchie and Ken Thompson
  • C++: developed by Bjarne Stroustrup
  • Java: developed by James Gosling at Sun Microsystems
  • ColdFusion: developed by J J Allaire
  • Pascal: developed by Niklaus Wirth

Then comes OOP,

2. Object oriented programming: The program is written as a collection of classes and object which are meant for communication. The smallest and basic entity is object and all kind of computation is performed on the objects only. More emphasis is on data rather procedure. It can handle almost all kind of real life problems which are today in scenario.

Examples of Object Oriented programming paradigm:

  • Simula: first OOP language
  • Java: developed by James Gosling at Sun Microsystems
  • C++: developed by Bjarne Stroustrup
  • Objective-C: designed by Brad Cox
  • Visual Basic .NET: developed by Microsoft
  • Python: developed by Guido van Rossum
  • Ruby: developed by Yukihiro Matsumoto
  • Smalltalk: developed by Alan Kay, Dan Ingalls, Adele Goldberg

Output
GfG!
Welcome to GeeksforGeeks
Lets create your account

your account has been created

3. Parallel processing approach: Parallel processing is the processing of program instructions by dividing them among multiple processors. A parallel processing system posses many numbers of processor with the objective of running a program in less time by dividing them. This approach seems to be like divide and conquer. Examples are NESL (one of the oldest one) and C/C++ also supports because of some library function.

2. Declarative programming paradigm

Declarative programming is a programming style that focuses on what needs to be done rather than how to do it. It expresses the logic of computation without describing the step-by-step control flow of the program. This paradigm includes logic, functional, and database programming and is often useful for simplifying complex and parallel programming tasks.

Advantages

  • Simplifies code by focusing on the desired result instead of implementation details.
  • Makes parallel programming and complex data processing easier to manage.

Disadvantages

  • Provides less control over execution flow and performance optimization.
  • Debugging and understanding internal execution can sometimes be difficult.

1. Logic programming paradigms: Logic programming is a paradigm based on facts, rules, and a knowledge base to solve logical problems such as puzzles and reasoning tasks. The program execution works like proving a mathematical statement, where the system derives results from given facts and rules.

predicates
 sumoftwonumber(integer, integer).
clauses
 sumoftwonumber(0, 0).
 sumoftwonumber(N, R) :-
 N > 0,
 N1 is N - 1,
 sumoftwonumber(N1, R1),
 R is R1 + N.

2. Functional programming paradigms: Functional programming is a paradigm based on mathematical functions where computation is performed through the execution of functions. It focuses on using functions for specific tasks while keeping data loosely coupled and minimizing changes in program state. Some of the languages like perl, javascript mostly uses this paradigm.

Examples of Functional programming paradigm:

  • JavaScript: developed by Brendan Eich
  • Haskell: developed by Lennart Augustsson, Dave Barton
  • Scala: developed by Martin Odersky
  • Erlang: developed by Joe Armstrong, Robert Virding
  • Lisp: developed by John Mccarthy
  • ML: developed by Robin Milner
  • Clojure: developed by Rich Hickey

The next kind of approach is of Database.

3. Database/Data driven programming approach: Database or data-driven programming focuses on data and its movement rather than hard-coded program steps. In this approach, program behavior is controlled by data operations such as storage, retrieval, filtering, and reporting. It is widely used in business information systems and database applications for managing structured data efficiently.

CREATE DATABASE databaseAddress;
CREATE TABLE Addr (
 PersonID int,
 LastName varchar(200),
 FirstName varchar(200),
 Address varchar(200),
 City varchar(200),
 State varchar(200)
); 
Comment

Explore