Object Paradigm Vs. Procedural Paradigm

A comparison the object paradigm and the procedural paradigm. The flaws of the procedural paradigm are also discussed, which made it possible for the evolution of a new paradigm.

Procedural Paradigm:

Previously, programs were written in a procedural fashion i.e. the statements were written in the form of a batch. But as the requirements grew, it was seen that the programs were getting larger and larger and it became difficult to debug. So functions were introduced to reduce the size of the programs and improve readability in them. Still that was not enough.

One of the major problems with the "Procedural Paradigm" was that data was treated as a stepson and functions were given more priority. Where as, it is the other way. In this procedure the original data could easily get corrupted, as it was accessible to all the functions, even to those which do not have any right to access them.

Object Oriented Paradigm:

At this point, a new procedure for programming was introduced. In this paradigm, the previous drawbacks were taken away. The data, which was treated badly in the procedural paradigm, was given the first priority. This was done by packing the data and the functions, which are supposed to have the access to the data, into one box known as an object. This made the chances of any unauthorized access of the data to die.

Before OOP, the programmer was restricted to use the predefined data types such as integer, float and character. If any program required handling of the x-y coordinates of some point then it is quite a headache for the programmer. Where as, in OOP this can be handled very easily as the programmer can define his own data types and the corresponding functions.

One of the advantages of OOP over Functional programming is that the objects made in a program can be reused by any other program. This increases the reusability of the programs once written. Objects are treated as the real life objects. Just like real life objects these objects have their own identities, behaviors and states. Similarly, as we know that there are different versions of programs that come out. The programs written in an OOP can be easily updated by using the facilities of inheritance.

Thus we conclude that the Object Oriented Paradigm is much reliable than the Functional Paradigm. The Object Oriented Paradigm has made the life of a programmer easier by providing the facilities of Data Hiding, Reusability by Inheritance and by Polymorphism.

Trending Now

© High Speed Ventures 2011