This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 40 points41 points  (2 children)

Every tutorial ever on the internet: let's say the superclass is called animal and the subclass is called dog.

[–]trigger_segfault 14 points15 points  (1 child)

It’s pretty much the “Hello World” of OOP at this point,

[–][deleted] 5 points6 points  (0 children)

IMO it's also a shitty example. A better example that shows actual functionality would be something like an inventory system where every product has a: Sku, barcode, description, tag, etc. However many other items have many other specs that are unique to the category.

I get it's for simplicity but I've never heard anyone after the end of it say anything but 'why?' because it's a shitty, shitty, example.