3 ms·
Erlang doesn't have enums.
by hota_mazi 4y ago
Erlang doesn't have enums.
- andrewflnr 4y agoI almost said the same thing, but a tuple starting with an atom is basically the dynamically typed version of an enum. :) You can safely think of ADTs as sugar and typing rules for such tuples, though I believe you do need dependent types to come at it from that direction...