3 ms·
"Virtual Structs" is a name for a potential feature that may expose some sort of structural inheritance or subtyping. The name is not used for the current "enu
by eddyb 11y ago
"Virtual Structs" is a name for a potential feature that may expose some sort of structural inheritance or subtyping.
The name is not used for the current "enum" feature, which is one of the few ADTs in Rust (there's also "struct" and tuples - not sure what else qualifies).
- pdpi 11y agoenum gives you sum types, struct/tuples provide product types. That's pretty vanilla ADTs sorted. GADTs are a whole other can of worms though.