2 ms·
> Product types without sum types and pattern matching are basically useless for expressing ADTs. That makes no sense. Algebraic data types are not expressed,
by masklinn 9y ago
> Product types without sum types and pattern matching are basically useless for expressing ADTs.
That makes no sense. Algebraic data types are not expressed, they're a concrete thing, a classification of composite types (by multiplication (hence product types) or addition (hence sum types)).
- kod 9y agoSure it does, languages allow you to express things. Some shitty languages don't have a concise way for you to express particular things (like sum types), so you have to rely on idioms or "patterns".