3 ms·
Rust is targeting both users who know the original definition as well as people who don’t. Differentiating between real enums and sum types means the language g
by mattgreenrocks 3y ago
Rust is targeting both users who know the original definition as well as people who don’t. Differentiating between real enums and sum types means the language gets another keyword for a concept that overlaps.
From a PL theory perspective, enum denotes an enumerable set of values within a type. It just happens that sums slot in well enough with that.
- bobbylarrybobby 3y agoBut the instances of a sum type aren't enumerable unless all of its generic parameters are enumerable.