Product types without sum types and pattern matching are basically useless for expressing ADTs. That's what people mean.
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".
Re:How Rust Gets Polymorphism Right [video]
by beojan on Monday November 13, 2017 @05:45AM
(#15685557)
C also has sum types with unions (though without any indication of which of the alternatives is actually present).
Re:How Rust Gets Polymorphism Right [video]
by red75prime on Monday November 13, 2017 @06:43AM
(#15685779)
They are mix types then.
Even C has product types. Which is why I'm always bothered when people claim language X lacks algebraic data types.
They probably lack sum types, but are very unlikely to lack product types.