3 ms·
Unfortunately OOP languages typically lack sum types, the mathematical dual of product types (objects with just fields). This means subtyping and inheritance is
by willtim 9y ago
Unfortunately OOP languages typically lack sum types, the mathematical dual of product types (objects with just fields). This means subtyping and inheritance is often needed to encode sum types.
- mbrock 9y agoIn functional languages it's easy to run into difficulties with extending a sum type without changing the defining module.