Hacker News new | ask | show | jobs
by brainzap 783 days 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.

2 comments

The term you're looking for is ADT - Algebraic Data Types

https://en.wikipedia.org/wiki/Algebraic_data_type

We did: Sum types.