• Fiery@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    Having data dependent on each other in a type means that either you have redundant data (so one of the fields should be computed) or that your container tries to be too generic (you should in this case prefer an ‘Apple’ class over a ‘Fruit’ class with an enum field ‘Type’)