Please NOTE, this list of paradigms is not exclusive. In this post, we will be discussing them briefly and talking about the topic of 'paradigms' in general. In later posts I will be more specific and go into greater detail. With that said, please enjoy the post, like and share with your friends!!!
To put it simply, a programming paradigm is a 'style of programming'.
Different programming languages tend to be more suited to a particular paradigm, than to others.
For example, Java is quite well suited to OOP because everything is encapsulated within a class, from the beginning.
On the other hand, Python is a general purpose language which can flip between procedural, OOP, functional and more!!
Importance (Why we Need different Ones?):
At this point, you might be thinking, why do we need different ones? It's a common question, particularly for beginner programmers.
Different problems require different solutions!! For e.g. it may be more beneficial to write a solution using OOP rather than functional programming. On the other hand, smaller solutions may only require a procedural solution. Remember that there are many different ways to solve problems and that you shouldn't limit yourself to just 1.
Procedural - Series of instructions telling the computer what to do, to solve the problem. Used by Python & Pascal.
Structured - Type of procedural programming, uses the programming constructs and modular techniques to decompose larger problems.
Object-Orientated-Programming - Views the world as a collection of objects that interact. Abstracts details and encourages reusability. E.g. Java.
Declarative - Writing statements describing the problem to be solved (queries) e.g. SQL.
Functional - Uses functions as the building blocks of programs. Statements are written as a series of functions.
Factors Impacting the Choice of Paradigm
I'm just gonna list some here and I challenge you, the viewer, to think about the benefits and trade-offs of them:
Number of lines of code required