this post was submitted on 01 Jun 2022
8 points (100.0% liked)
Rust Programming
8140 readers
18 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Most functional languages, like Haskell, ML family (SML, OCaml, F#). They're usually not using an
enum
keyword though.Yeah, in language theory, this kind of thing is called an "Algebraic Data Type": https://en.wikipedia.org/wiki/Algebraic_data_type