Re:How Rust Gets Polymorphism Right [video]
by kod on Monday November 13, 2017 @08:26AM
(#15686355)
Product types without sum types and pattern matching are basically useless for expressing ADTs. That's what people mean.
[ Parent
| on HN ]
Re:How Rust Gets Polymorphism Right [video]
by masklinn on Monday November 13, 2017 @08:31AM
(#15686382)
> 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)).
Sure 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".