4 ms·
Enums enable two things: check current type from union of types and exhaustivity check in switch The former is solved by reflection, the latter by sealed class
by SemanticStrengh 4y ago
Enums enable two things:
check current type from union of types
and exhaustivity check in switch
The former is solved by reflection, the latter by sealed classes.