The title is a quote by a friend of mine. We were having a discussion about different programming languages and their respective advantages. We got into the topic of object-oriented languages. She mentioned her fondness for Java and C#. I mentioned C++, because it was the language emphasized by my CS courses. It was after all an object-oriented language, or so I thought. My friend scoffed and bluntly replied “C++ is desperate to be Object-oriented”.
My friend made the argument that C++ is not a pure object-oriented language…and she’s right! C++ is actually a multi-paradigm programming language. This means it has elements of both object-oriented and procedural programming. Of course, I could list multiple “object-oriented” languages that are actually multi-paradigm. These include Object Pascal, VB.NET, C# and Java. Of course, most Java fanatics will retort that C++ cannot be considered “object-oriented” because you can actually define certain functions outside of the class. However, I would argue that Java allows certain members to be used without objects and it utilizes primitive data types.
It seems like a lot of programming geeks have their own definition of object-oriented which they use to boost the superiority of their preferred programming language. However, the standard definition of object-oriented programming (as written in CS textbooks include the following): Data Encapsulation, Dynamic Binding, Polymorphism, and Inheritance. If a programming language includes all of that, it is considered to be object-oriented even if it has other elements.
C++ fits the criteria.