It can be used as an enum and might be more convenient in places where you don't need to bother converting between string data outside the system and enum data types.
It also plays nicely with union types, so that you can very quickly define as hoc enums directly in your function declarations, which might be useful if there's only one or two usages of a particular enum, or a section of code where the allowable values very quickly changes.
You basically get a lot of expressiveness without boilerplate, which can be pretty convenient.
It also plays nicely with union types, so that you can very quickly define as hoc enums directly in your function declarations, which might be useful if there's only one or two usages of a particular enum, or a section of code where the allowable values very quickly changes.
You basically get a lot of expressiveness without boilerplate, which can be pretty convenient.