Article by Ayman Alheraki on January 11 2026 10:36 AM
Mastering Object-Oriented Programming in Modern C++ Book (2025)
Functional Programming Using Modern C++
Over the course of 20 years of programming in C++, I have designed and developed massive programs containing hundreds of millions of lines of code. Yet, I rarely used object-oriented programming (OOP), except in limited cases, such as when working with pre-built libraries that rely on this paradigm. Instead, I primarily relied on procedural programming, designing my libraries as collections of functions without the need to create classes or objects. This raises an important question: Can a professional programmer do without OOP and rely solely on procedural programming?
Procedural programming relies on dividing a program into a set of functions that perform specific tasks. These functions operate directly on data, which is often separate from the functions themselves. On the other hand, object-oriented programming groups data and functions together into objects, allowing for more organized and reusable structures.
Throughout my career, I found that procedural programming was sufficient to meet my needs. I designed my libraries as collections of functions, with each function responsible for a specific task. This approach was simple and easy to understand, especially in large projects where maintaining code clarity and ease of maintenance was crucial. I never felt the need to use classes or objects, as functions provided me with enough flexibility to accomplish the required tasks.
Simplicity: Procedural programming is simpler to design and implement, especially for small or medium-sized projects. There’s no need to think about designing classes or their relationships.
Speed: In some cases, procedural programming can be faster to execute because it avoids the complexities associated with creating and managing objects.
Direct Control: Procedural programming gives you direct control over data and operations, making debugging and maintenance easier.
Difficulty in Reusability: One of the biggest drawbacks of procedural programming is the difficulty in reusing code. Functions are often tied to a specific context, making it hard to reuse them in other projects without modifications.
Management Challenges in Large Projects: In large projects, procedural programming can become messy and hard to manage due to the sheer number of functions and the lack of a clear structure to organize them.
Lack of Abstraction: Procedural programming lacks the level of abstraction provided by OOP, making it difficult to model complex systems.
Although I avoided OOP for years, there are cases where it becomes essential, especially in:
Graphical User Interfaces (GUI): As I mentioned, OOP is the ideal choice for developing user interfaces, as objects naturally represent graphical elements like buttons and windows.
Large and Complex Projects: In large projects, OOP helps organize code better and simplifies maintenance and development.
Reusability and Extensibility: OOP provides a high level of reusability and extensibility, especially when using concepts like inheritance and polymorphism.
The answer is: Yes, but with limitations. In my experience, procedural programming was sufficient for developing large and complex programs without the need for OOP. However, this doesn’t mean that OOP is unimportant. There are cases where OOP is the better choice, especially in GUI development or projects that require a high level of organization and reusability.
Ultimately, the choice between procedural programming and OOP depends on the nature of the project and its requirements. A professional programmer should be able to use both paradigms effectively and choose the right tool for the right task. For me, procedural programming was enough, but this doesn’t negate the power and effectiveness of OOP in many other contexts.