@[email protected] to Rust [email protected] • 2 years agoAre there other languages that rust where enums can store data?message-square6fedilinkarrow-up18arrow-down11
arrow-up17arrow-down1message-squareAre there other languages that rust where enums can store data?@[email protected] to Rust [email protected] • 2 years agomessage-square6fedilink
minus-square@[email protected]linkfedilink8•2 years agoMost functional languages, like Haskell, ML family (SML, OCaml, F#). They’re usually not using an enum keyword though.
minus-squareEpheralinkfedilink7•2 years agoYeah, in language theory, this kind of thing is called an “Algebraic Data Type”: https://en.wikipedia.org/wiki/Algebraic_data_type
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