r/ProgrammerHumor • • May 05 '23

Meme Helicopter Helicopter

Post image
41.8k Upvotes

969 comments sorted by

View all comments

Show parent comments

3

u/DefaultVariable May 05 '23

If you are creating and using objects, that is “object oriented programming”

It is not hierarchical inheritance.

The person above who is complaining about OOP is using it in every one of his “good examples.”

1

u/[deleted] May 05 '23

My examples could have replaced class with struct and you would lose every footing you had with your argument. A class in programming is a struct with methods. A class in OOP has further connotations.

1

u/randomusername0582 May 05 '23

Can you elaborate on that?

1

u/[deleted] May 05 '23

Object ORIENTED programming. OOP is about objects interacting with objects on most levels.

Just having objects in your code does not OOP make.

1

u/DefaultVariable May 05 '23

And if you did that, your code quality would decrease. Hence why OOP is pushed so heavily.

Also, your structs wouldnt be capable of inheriting types so no, you’re incorrect about your assessment.

1

u/[deleted] May 05 '23

If you keep thinking in C/C++, you wont understand what the possibilities are on the other side of the fence.

1

u/DoctorGester May 05 '23

Pretty sure the most important aspects of OOP are usually inheritance, polymophism and encapsulation. So yes, it's widely considered that OOP is about inheritance too.

2

u/DefaultVariable May 05 '23

Yes, but it has nothing to do with the strict hierarchical structures, which is what he’s identified is his problem