Programming paradigm

« Back to Glossary Index

A programming paradigm is a way of approaching and organizing programming — a philosophy or style that defines how programs are designed and structured to solve problems. Each paradigm establishes a set of principles, rules, and techniques that describe how operations should be carried out within a programming language.

For example, imperative programming describes how things must be done (step by step), while declarative programming defines what we want to obtain, and functional programming focuses on pure functions without changing the program state. Other well-known paradigms include object-oriented programming (OOP) and logic programming.

  • Imperative: the program describes sequential instructions that modify the system’s state.
  • Declarative: goals are defined, and the language decides how to achieve them (e.g. SQL).
  • Functional: based on pure mathematical functions and avoids mutable state.
  • Object-oriented: models the real world using objects that combine data and behaviour.
  • Logic: uses rules and facts to deduce conclusions (e.g. Prolog).

Python is a multi-paradigm language: it allows the use of more than one programming style depending on the context or project needs.

Examples of paradigms in Python:

  • Imperative: use of loops and variables.
  • Functional: use of map(), filter(), reduce(), and lambda functions.
  • Object-oriented: use of classes and methods.

In summary: a programming paradigm is a way of thinking about code — a mental framework that defines how logic, data, and behaviour are organized in programs.

« Back to Glossary Index