logoalt Hacker News

cryptonector • 01/22/2025 • 0 replies • view on HN

I think what you mean is that if a Square that is also a Rectangle can't be made to be non-square, then inheritance works. Which, fair enough, but I think there's still other good reasons that inheritance is a bad approach. Interfaces (and traits) are still way better.