Three major programming paradigms:
- Structured programming
- Object-oriented programming
- Functional programming
Structured programming was discovered by Edsger Wybe Dijkstra in 1968. This programming paradigm enforced discipline on direct transfer of control by introducing if/then/else and do/while/until constructs.
Object-oriented programming was invented by “Ole Johan Dahl and Kristen Nygaard” in 1966. It enforced discipline on indirect transfer of control by moving the function call stack frame to the heap. This led to the introduction of object-oriented concepts:
- Functions became class constructors.
- Local variables become instance variables.
- Nested functions become methods.
Functional programming predates structural programming and object-oriented programming. It was a result of the work of American mathematician and computer scientist known as Alonzo Church, who invented I-calculus in 1936. It enforces immutability on values of variables — meaning the values of variables should not change upon assignment.