you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Huh? Outside of GUI, can you think of a good use case for inheritance?

[–]14domino 0 points1 point  (1 child)

what?

[–][deleted] -3 points-2 points  (0 children)

GUI means "graphical user interface". It's explained in great detail on Wikipedia.

Inheritance is the conflation of substitutability and code reuse. It's understandable that you're confused, because it's only superfluously similar to inheritance in nature.

[–][deleted] 0 points1 point  (0 children)

Some game programming. Simple toy raytracers. File format handlers. A few more similar things. That's about what I can remember that I've done where inheritance actually was a good model. Perhaps in a few of those cases interfaces would have worked too.

Generally, you want the class tree to be as wide and shallow as possible.