blog




  • Essay / The advantages and disadvantages of object-oriented programming and...

    Object-oriented programming vs procedural programming - the advantages and disadvantagesComputer programming, as we know, is an important engineering task in the modern world where a maximum of electronic equipment is based. on microcontrollers and microprocessors. The cost of microprocessors and controllers has become so low that the cost of the entire electronic circuit, which was once extremely high in the 1970s and 80s, has now dropped significantly. Even the simple microcontrollers that we use today are capable of performing complex arithmetic tasks as well as several other tasks such as on-chip network interface, wireless interface, etc. In order to use all the functions of a given processor, one must know important programming procedures. available today. In this research paper, we will review two distinct and most debated programming procedures: the object-oriented programming method and the procedural programming method. Let's first look at 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 and execute them, then return to the main flow of the program. Different procedures are defined in the program and can be called at any time during execution. Procedural programming is also called imperative programming because at certain times the declared variables or constants are specific to the processor registers. For example, a program written for the ATmega328 microcontroller would not run on the TI LM4F120 because the register addresses, address bus, and memory interface would be very different. The most well-known process ...... middle of paper ...... more readable, which is useful for maintaining the code well. While 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 will not be felt at all, but if we are using OOP on embedded systems, we need to ensure 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 hardware and has very less execution time, making it possible to make our way into real-time applications of equipment critical and in real-time signal processing. Although procedural languages ​​do not make the code very readable and maintaining it can sometimes be difficult. As processors become more and more powerful, the trend is towards OOP, but the procedural programming style dominates the world of embedded systems.