this post was submitted on 01 Jun 2022
7 points (88.9% liked)
Rust Programming
8335 readers
2 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