
On Sun, 17 Apr 2022 at 02:23, David Mertz, Ph.D. <david.mertz@gmail.com> wrote:
One thing I do find a bête noire is the silly claim, that Chris repeats, that inheritance expresses "Is-A" relationships. It was torture in the 1990s hearing about vehicles and trucks and sedans as if that had something to do with programming. I never "got" OOP for at least 5 years later than I should have because of those horrible Linnaean metaphors.
A button IS a widget. A horizontal box IS a box. A box IS a container. A container IS a widget. Class hierarchies in graphical systems are just as much based on those is-a relationships as any of those "horrible metaphors" you may have come across, and they are absolutely to do with programming. Just because you had a bad teacher, that doesn't mean the concepts are wrong. ChrisA