Programming Paradigms and what they really mean

Programming Paradigms are ways of programming that are unrelated to once choice of a programming language. Paradigm tells one which programming structure to use and when to use them.

To date, there have been 3 programming paradigms. You will be surprised to know that all of them were discovered before the year 1968. Following are the 3:

Structured Programming

Structured programming imposes discipline on direct transfer of control.

The structured programming paradigm was discovered by Edsger Wybe Dijkstra in the year 1968. This was the first programming paradigm to be adopted(not invented).

Dijkstra demonstrated that the use of unrestrained jumps(goto statements) is harmful to program structure. In structured programming, the goto was replaced with the more familiar constructs of if/then/else and do/while/until.

Object-Oriented Programming

Object-oriented programming imposes discipline on indirect transfer of control.

This was the second paradigm to be adopted but was discovered in the year 1966 by two programmer Ole Johan Dahl and Kristen Nygaard.

The programmers noticed that the function call stack frame in the ALGOL language could be moved to a head, thereby allowing the local variables declared by a function to exist long after the function returned. This function became a constructor for a class, the local variables became instance variables and the nested function became methods. This led inevitably to the discovery of polymorphism through the disciplined use of function pointers.

Functional Programming

Functional programming imposes discipline upon assignment.

This is the third paradigm to be adopted but the first one to be discovered. Functional programming is the direct result of the work of Alonzo Church, who in the year 1936 invented I-calculus which in turn is the foundation of LISP language invented by John McCarthy in 1958.

The foundational notational of I-calculus is immutability — that is, the notation that the values of symbols do not change. Most functional programming languages have some means to alter the value of a variable, but only under strict discipline.

Food for thought

Each of the paradigms removes capabilities from the programmer(for the greater good 😉). None of them adds new capabilities but imposes some kind of extra discipline that is negative in its intent. They tell us what not to do, more than they tell us what to do.

Note that all the paradigms were discovered within the ten years between 1958 and 1968.

[1] Clean Architecture — Rober C Martin

Avid reader of books articles etc. Delving into the art of writing 😉