You are on page 1of 4

Different types of programming paradigms

There are three types of programming paradigms in programming:

1) Imperative programming paradigms


2) Object oriented programming paradigms
3) Functional programming paradigms

 Imperative programming paradigms

It is one of the oldest programming paradigms. It features close relation to


machine architecture. It is based on von Neumann architecture. It works by
changing the program state through assignment statements. It perform step by
step task by changing state. The main focus is on how to achieve this goal. The
paradigm consists of several statements and after execution of all the result is
stored.

 Advantages

The advantages of imperative programming are:

1) Efficient
2) Close to the machine
3) Popular
4) Very simply to implement
5) It contains loops, variable etc.

 Disadvantages

The disadvantages of imperative programming paradigm are:

1) Complex problem cannot be solved


2) Less efficient and less productive
3) Parallel programming is not possible
 Functional programming paradigm

The functional programming paradigms have its roots in mathematics and it is


language independent. The key principal of this paradigm is the execution of the
mathematical functions. The central model for the abstraction is the function
which are meant for some specific computation and no the data structure. Data
are closely coupled to functions. The functions hide their implementation.
Functions can be replaced with their values without changing the meaning of
program. Some of the language like Perl, java script, mostly uses this paradigm.

 Advantages
1) As functional programming paradigm language do not support start that
means we can write error free or bugs free program.
2) Functional programming support nested functions.
3) We can reuse functions very easily
4) Functional programming is very good for developing big data applications.

 Disadvantages
1) Comparatively less efficiency
2) Problems involving many variables or a large number of sequential
activities are sometimes easier to handle imperatively.

 Object oriented paradigm

it is designed to remove some drawback of procedure oriented programming.


Oops treats data as important element in the program development and does not
allow it to flow freely around the system/program. Oops divided a program into a
member of entities called objects and then build data and functions around these
objects. In oops data of an object can be accessed only by the function associated
with that object. Functions of one objects can access the function of other
objects. Oops ties data and functions together and protects it from accidental
modification from outside function. In oops data is hidden (secure) and cannot be
accessed by external functions. In oops object can communicate with each other
therefore function. In oops an emphasis is on data rather than procedures. Oops
follows bottom up program design approach.

 Advantages
1) Program written in oops language are easy to understand.
2) Since everything is treated as objects so we can model a real world concept
using oops.
3) Oops provides the features of reusability we can reuse the classes that are
already created without writing them again and again.
4) Since the parallel development of classes is possible in oops concept it
results in the quick development of the computer program.
5) Program written in oops language are easy to test, manage and maintain.
6) It is secured development technique for program designing since data is
hidden and cannot be accessed by external functions.
7) Object oriented systems can be easily upgrade from small and large
systems.
8) It is easy to partition the work in project based on objects.
9) We can build program from the standard working modules rather than
having to start writing the code from beginning. This leads to saving of
development time. Because of this we can develop more projects in less in
time.

 Disadvantages
1) The programmer should have a proper planning before designing a
program using oops approach.
2) Since everything is treated as objects in oop, the programmer need proper
skills such as design skills, programming skills, thinking in terms of objects
etc.
3) The size of program developed with oops is larger than the procedural
approach.
4) Since object oriented programs are larger in size, that result slower
execution of program.
5) For complex applications it is difficult to trace and debug message passing
between many objects.

You might also like