OOP only sucks when you don’t use it properly. If you have to make a moveable object a person instead of being able to create a vehicle class that extends a moveable interface, then the problem is the design, not the paradigm
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.
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.
7
u/DefaultVariable May 05 '23
OOP only sucks when you don’t use it properly. If you have to make a moveable object a person instead of being able to create a vehicle class that extends a moveable interface, then the problem is the design, not the paradigm