Clean Architecture
Chapter 3 - Paradigm overview
Structured programming
- Discovered by Dijkstra in 1968
- It was shown that unrestrained jumps (goto and continue statements) are harmful to program structure
- Lack of readability for control flow
- More familiar constructs such as if-else and looping constructs were implemented
- Structured programming imposes discipline on direct transfer of control
Object-oriented programming
- Discovered by Ole Johan Dahl and Kristen Nygaard in 1966
- Noticed the function call stack frame could be moved to a heap, allowing local variables declared by a function to exist after it's returned
- The concept of classes was introduced which led to polymorphism
- Function became a constructor
- Local variables became instance variables
- Nested functions became methods
- Object-oriented programming imposes discipline on indirect transfer of control
Functional programming
- The most recent paradigm to be adopted but first to be invented
- LISP is a functional programming language based off I-calculus (immutability, values of symbols don't change)
- Functional languages don't have assignment statements, but have ways to alter the value of a variable under strict discipline
- Functional programming imposes discipline upon assignment
Food for thought
- Each paradigm removes capabilities, not add
- Removing goto statements
- Removing function pointers
- Removing assignments
Conclusion
- Polymorphism to cross architectural boundaries
- Functional programming imposes discipline on location and access to data
- Structured programming as the algorithmic foundation of our modules