Things that Exist in Known, Limited, and Discrete States
Enum values are important to us because of what they represent and in context to other values in the set
A processed payment can have one of three values
Help with readability, and to centralize truth
Still just syntactic sugar around a scalar value
This works, but it is oh, so wrong...
A type is an attribute of a unit of data that tells the computer what values it can take and what operations can be performed upon it.
An enumerated type restricts the possible values of an instance to a discrete set of named members.
In practice, this means that an enum variable can have any value in the set and only values in the set can be values.
Slides & Resources