Hacker News new | ask | show | jobs
by eddyb 4062 days 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).

1 comments

enum gives you sum types, struct/tuples provide product types. That's pretty vanilla ADTs sorted. GADTs are a whole other can of worms though.