Hacker News new | ask | show | jobs
by H4ZB7 1204 days ago
inheritance is NOT for liskov substitution, and not even OOP fans will argue that as most even consider inheritance a mistake. inheritance is specifically to make a subclass with the same methods and allow overriding a select few. it's basically just a syntactic shortcut. you get the added bonus that it of course still satisfies the interface of the parent, which is the semantic part, but this is a vanishingly small benefit