Tuple enumeration without integers or strings

Paul paultjeadriaanse at gmail.com
Sun Jan 3 01:15:56 UTC 2021


On Saturday, 2 January 2021 at 21:48:04 UTC, Paul Backus wrote:
> Yes, but this will be true of any approach you choose. If two 
> enum members have exactly the same value, there is no way to 
> distinguish between them, either at compile time or at runtime.

Oh I see, thanks!
A bit of a bummer as I guess that means you're pretty much 
required to use an additional seperate structure like an array or 
map/associative array, the latter making the use of an enum 
instead of string names slightly pointless in this scenario, 
thank you nontheless 😅.


More information about the Digitalmars-d-learn mailing list