On Sun, 17 Apr 2022 at 02:23, David Mertz, Ph.D. <david.me...@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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/AXY5ZJORW2CWBCCH5H7MQ6HULUG4DPRT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to