News for hackers. Stuff that matters.
Re:The Case Against OOP Is Wildly Overstated by rovolo on Friday July 31, 2020 @03:21PM (#24012764)
You can have polymorphism without inheritance. A single class can implement multiple interfaces, and multiple classes may implement the same interface.

What is your background? C++ combines interfaces and abstract classes, so this may be the issue you're running into. An interface is an abstract class with no instance variables or method implementations. The trouble with inheritance lies in overriding the superclass's method implementations.

There are no comments on this comment yet.