Home
Blog
Is Object-Oriented Programming Worth It
Updated
Dot Net Perls

Is Object-Oriented Programming Worth It

Some decades ago a new programming concept became popular: object-oriented programming. The basic unit of program design would become the class, and classes could contain methods and fields, and inherit from other classes. Runtime types could determine what methods were called.

All was great, and programs became perfect, with no further bugs ever being introduced. Back in reality, though, OOP introduced a lot of complexity, and it was hard for even experienced developers to grasp. And after learning about OOP and writing about it, I think of it mainly as a program organization strategy.

Here are some of my realizations about OOP:

Runtime type detection is no different from if-statements and switches on a field—it seems "more advanced" to call a derived or virtual method, but in reality, it is just another conditional branch.
Some OOP concepts seem more advanced than traditional code like if-statements, but they are just more complex to use, and the end result is the same.
OOP concepts are a way to organize programs in a structured way (around classes), and this is the key advantage.

In conclusion, object-oriented programming is nothing special when it comes to the runtime execution of programs. But it makes it possible to organize programs in a more complex (and possibly harder-to-understand) way. These organizational constructs can be beneficial on larger programs, but are rarely worthwhile on smaller ones.

Dot Net Perls is a collection of pages with code examples, which are updated to stay current. Programming is an art, and it can be learned from examples.
Donate to this site to help offset the costs of running the server. Sites like this will cease to exist if there is no financial support for them.
Sam Allen is passionate about computer languages, and he maintains 100% of the material available on this website. He hopes it makes the world a nicer place.
An RSS feed is available for this blog.
Home
Changes
© 2007-2025 Sam Allen