• NigelFrobisher@aussie.zone
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    1 day ago

    Examples of inheritance hierarchies are always totally useless shit like this - what if a cow is an animal; What if a cow is a mammal, all mammals are animals and all mammals have a lactate() method?

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      9
      ·
      12 hours ago

      Because any real life use that might come to mind would probably be related to some NDA protected database in a company.
      And it is otherwise hard to think of anything at the spot, so just go with what the first example on the web-search came up with.