Revisiting programming paradigms
Before solving a problem, we should always try to understand where it came from, then break the problem into the steps that we will perform to solve it. We should make sure that we consider all the scenarios and the agents that will be involved in solving the problem.
The programming paradigm refers to the breaking up of the programming activity into a structure of thoughts. It is an approach towards a problem and the orientation of sub-tasks. Although a problem can be approached using different paradigms, one paradigm may be more suited to solving it than another.
There are many programming paradigms, so we will only be discussing a few of them here:
- Imperative
- Logical
- Functional
- Object-oriented
Understanding the programming paradigm is recommended, as one programming language may be more suited to one particular paradigm. For example, C is suited to imperative programming, Haskell is suited to functional programming, and Smalltalk is for object-oriented programming...