3 ms·
The original enum are just enumerated integer constants. What people want "the ability to express enums with an associated value", I think we should invent a n
by brainzap 2y ago
The original enum are just enumerated integer constants.
What people want "the ability to express enums with an associated value", I think we should invent a new term.
- masterj 2y agoThe term you're looking for is ADT - Algebraic Data Types https://en.wikipedia.org/wiki/Algebraic_data_type https://en.wikipedia.org/wiki/Algebraic_data_type
- randomdata 2y agoWe did: Sum types.