The Pros and Cons of Object Orineted Programming and Procedural Programming

1259 Words6 Pages
Object oriented programming vs. procedural programming - the pros and cons Computer programming as we know is an important engineering task in modern world where a maximum number of electronic equipment are based on microcontrollers and microprocessors. The cost of microprocessors and controllers have gone so low that the cost of entire electronic circuit which used to be sky high in 1970s and 80s, has now gone to down drastically. Even the simple microcontrollers we use today are able to perform complex arithmetic tasks along with several other tasks such as on chip network interface, wireless interface, etc. In order to utilize all the functions of a given processor, one must know the important programing procedures available today. In this research paper we will go through two distinct and most debated programming procedures – The object oriented Programming method and the procedural programming method. Let us first look at what Procedural programming is before jumping on to the Object oriented programming. Procedural programming uses the sequential flow of the instructions. Each statement or each instruction is executed sequentially. The program may call subroutines and other functions and execute them and then return to the main program flow. Different procedures are defined in the program which may be called at any point during execution. Procedural programming is also known as imperative programming because at certain times the variables or constants declared are specific to the processor’s registers. For example, a program written for the microcontroller ATmega328 would not work on TI LM4F120 because the register addresses, the address bus and memory interfacing would differ to a great extent. The most commonly known proc... ... middle of paper ... ... more readable which is helpful for maintaining the code well. Whereas this flexibility for the programmer has impact on the execution speed of the program. If the processor we are dealing with is powerful enough then the impact would not be felt at all, but if we use OOP on embedded systems, we have to take care that the memory footprint of the program is less. If this requirement is not met we can always use the procedural programming style which is very close to the hardware and has a very less execution time, making its way into the real time applications of life critical equipment and real time signal processing. Although procedural languages do not make the code very readable and maintaining it can be, at times difficult. As the processors get more and more powerful, the trend is towards OOP, but procedural programming style rules the world of embedded systems

More about The Pros and Cons of Object Orineted Programming and Procedural Programming

Open Document