• SparroHawc@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    I like interfaces as a supplement to inheritance. The strength of inheritance is getting all of the internal functionality of the parent class, while still allowing you to differentiate between children.

    Interfaces are useful for disparate classes which don’t have much in common besides fitting within a specific use case, rather than classes that are very similar to each other but need specific distinguishing features.