Topics


Pages


Content

Uncategorized Links

In this section of pages, I cover definitions of paradigms and links to learn more. For some areas I also cover languages that focus on enable that paradigm.

There over 200 programming languages, so I wouldn’t cover them all here.

Paradigms constrain what you can do with a language and gives it focus. The early languages could be used for anything this lack of structure makes it harder.

Overview

The info below is based on Comparison of Programming Paradigms page on Wikipedia, which uses the “approaches” and “paradigms” groupings.

Approaches

There are two main approaches to programming:

  • Imperative Programming – focuses on how to execute, defines control flow as statements that change a program state.
  • Declarative Programming – focuses on what to execute, defines program logic, but not detailed control flow.

Paradigms

The following are widely considered the main programming paradigms, as seen when measuring programming language popularity. These are light comparisons.

From Comparison of Programming Paradigms on Wikipedia.

These are tools you can use. And you can take learnings from both and apply them, for example avoiding side-effects is a good idea in any of them.

From Programming Paradigm on Wikipedia.

Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms.

Approaches and paradigms

Here is how the Programming Paradigm article on Wikipedia classifies paradigms within approaches.

Common programming paradigms include:

  • imperative in which the programmer instructs the machine how to change its state,
    • procedural which groups instructions into procedures,
    • object-oriented which groups instructions with the part of the state they operate on,
  • declarative in which the programmer merely declares properties of the desired result, but not how to compute it
    • functional in which the desired result is declared as the value of a series of function applications,
    • logic in which the desired result is declared as the answer to a question about a system of facts and rules,
    • mathematical in which the desired result is declared as the solution of an optimization problem
    • reactive in which the desired result is declared with data streams and the propagation of change

Another comparison, based on YouTube video:

Approach Paradigm Description
Imperative Procedural The default style.
Mixed Procedural + Functional Minimize state.
Imperative OOP Segregate state.
Mixed OOP + Functional Minimize and segregate state. See Mix FP and OOP page for more info.