3 ms·
This sort of subtyping tree available in abstract algebra isn't the same as an inheritance tree. Inheritance merely layers constructors. What you really want t
by tel 12y ago
This sort of subtyping tree available in abstract algebra isn't the same as an inheritance tree. Inheritance merely layers constructors.
What you really want to consider is interface subtyping and layering. Actually, more than just interfaces you want to also carry along laws. For instance, a group is a monoid with an inverse operation appended (interface concatenation) cut down by the fact that the inverse operation must be "nice" (law concatenation). If you only append the interfaces you end up with free structures.