In this lesson, you will learn.
- Procedural Oriented Programming (POP)
Procedural Oriented Programming (POP) Language
- Procedural Oriented Programming (POP) is a programming paradigm based on the concept of subroutines or procedure calls also called functions.
- This approach contrasts with Object-Oriented Programming (OOP), which organizes software design around data, or objects, rather than functions and logic.
Key Concepts of POP
Functions and Procedures:
- The core concept of POP is the use of functions or procedures. These are blocks of code that perform a specific task and can be called from other parts of the program.
- A procedure might perform a task and then return control to the calling function, while a function typically returns a value.
Modularity:
- The program is divided into smaller modules or procedures. Each module can be developed and tested independently, which simplifies the programming process and debugging.
Sequential Execution:
- Execution in procedural programming is top-down, starting from the main function or procedure and proceeding through various function calls sequentially.
Variable Scope and Global Variables:
- Variables in procedural programming can be either local to a procedure (local variables) or accessible to all procedures (global variables).
- The use of global variables is common, but it can lead to issues with data integrity and security
Stateful Procedures:
- Procedures in POP can maintain state information through the use of static or global variables. However, unlike OOP, data and methods are not encapsulated together.
Advantages of POP
Simplicity
- Routine tasks and procedural programming can be more straightforward than OOP.
Performance
- In some cases, procedural programs can be more efficient in terms of execution time and memory usage, as there is less overhead than in OOP.
Ease of Learning:
- The concepts of procedural programming are generally easier to grasp for beginners.
Disadvantages
Scalability
- As projects grow in size and complexity, procedural code can become harder to maintain and extend compared to OOP.
Code Reusability
- OOP offers better mechanisms for code reuse through inheritance and polymorphism, which is less inherent in procedural programming.
Data Security
- The widespread use of global variables can lead to issues with data security and integrity.
Maintenance Challenges
- Large procedural programs can become unwieldy, making maintenance and updates challenging.
POP Languages
- C is the most prominent example of a procedural programming language.
- Other examples include Fortran, Pascal, and BASIC.
End of the lesson….enjoy learning
Student Ratings and Reviews
There are no reviews yet. Be the first one to write one.
Submit a Review