Object Oriented Programming and Procedural Programming: The Pros and Cons Computer programming, as we know, is an important engineering task in the modern world where a maximum number of electronic equipment on microcontrollers and microprocessors. The cost of microprocessors and controllers has fallen so low that the cost of the entire electronic circuit, which was skyrocketing in the 1970s and 1980s, has now dropped dramatically. Even the simple microcontrollers we use today are capable of performing complex arithmetic tasks along with many other tasks such as the chip's network interface, wireless interface, etc. To use all the functions of a given processor, you need to know the important programming procedures available today. In this research paper we will look at two distinct and most debated programming procedures: the object-oriented programming method and the procedural programming method. Let's first see what procedural programming is before moving on to object-oriented programming. Procedural programming uses the sequential flow of instructions. Each statement or instruction is executed sequentially. The program can call subroutines and other functions, execute them, and then return to the main flow of the program. Several procedures are defined in the program that can be called at any time during execution. Procedural programming is also called imperative programming because at certain times the variables or constants declared are specific to the processor registers. For example, a program written for the ATmega328 microcontroller would not work on the TI LM4F120 because the register addresses, address bus, and memory interfacing would differ significantly. The most commonly known process... half of the paper... more readable, useful for maintaining the code well. Whereas this flexibility for the programmer has an impact on the speed of execution of the program. If the processor we are dealing with is powerful enough the impact would not be felt at all, but if we use OOP on embedded systems, we must take care that the memory footprint of the program is smaller. If this requirement is not met, we can always use procedural programming style which is very close to the hardware and has much lower execution time, making its way into real-time applications of life-critical equipment and signal processing in real time. Although procedural languages do not make the code very readable and maintaining it can be, at times, difficult. As processors become more and more powerful, the trend is towards OOP, but procedural programming style rules the world of embedded systems
tags