• Fades@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    6 months ago

    Why are females typed differently than males instead of a base class human with a gender identity parameter? Why would human anything have a function called young?? What would that function even do???

    • purplemonkeymad@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      HumanFemales and HumanM both inherit from the Ape base class, it’s from an older java code base. We tried to change it once but it turned out the person that had written had retired and any changes we made just broke stuff.

    • cheddar@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      6 months ago

      The young method returns a boolean parameter. Females have a different type for obvious biological discrepancies that require extra functionality.

    • qarbone@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      Could be a subclass. However, it should just be an ‘is’ method which is passed the array of [young, pretty] as input