Paradigms
Paradigm is the method or you can say ways to solve some problem or do some task.
Introduction of Programming Paradigm
Programming paradigm is an approach to solve problem using some methods or techniques that are available to us.
Types of Paradigm
-
Imperative
- Procedural Paradigm
- Object Based Paradigm
- Object Oriented Programming
-
Delcarative
- Logic Programming
- Functional Programming
- Database Processing Approach
Imperative Programming Paradigm
It is one of the oldest programming paradigm. It is based on Von Neumann architecture. It's main focus is on how to achieve the goal. The paradigm consist of several statements and after execution of all the result is stored.
-
Advantage:
- Very Simple
- It contains loops, variable.
-
Disadvantage:
- Complex problem cannot be solved
- Less efficient and less productive
- Parallel programming is not possible
Declarative Programming Paradigm
It is a style of building programs that expresses logic of computation without talking about its control flow. It's main focus is on what need to be done rather how it should be done basically emphasize on what code code is actually doing.
-
Advantage:
- Short, efficient ode
- Can be implemented using methods not yet known
-
Disadvantage:
- Sometimes hard to understand
- Based on an unfamiliar conceptual model
- Hard to take characteristics of individual applications into account during programming