Earlier quoted context omitted.
Sounds like more Scala sophistry. I thought they were supposed to be aiming for pragmatism with Scala 3.
I use it in Typescript often. Very useful. type Verb = 'GET' | 'POST' | 'PUT' | 'DELETE'; export type TerminusType = 'ICAO' | 'IATA' | 'LOCODE' | 'ADDRESS' | 'LATLNG'; It's much better than just assuming it's a string and hoping you don't make a typo. If the value is supplied from user input then it ensures that you write checks or switch cases.
> type Verb = 'GET' | 'POST' | 'PUT' | 'DELETE';
> export type TerminusType = 'ICAO' | 'IATA' | 'LOCODE' | 'ADDRESS' | 'LATLNG';
> It's much better than just assuming it's a string and hoping you don't make a typo.
> If the value is supplied from user input then it ensures that you write checks or switch cases.
Conceptually, how is this different to an enum?