From the D Blog: Crafting Self-Evident Code in D

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Oct 3 19:12:23 UTC 2023


On 04/10/2023 8:03 AM, Walter Bright wrote:
> On 10/3/2023 12:36 AM, Max Samukha wrote:
>> 'No hire' for language designers who design sum types to be implicitly 
>> enumerated and convertible to integers and booleans?
> 
> There's a reason my salary from the D Foundation is $0.

As long as its the tag value implicitly converting, I would suggest that 
is fine and is how I'd do it.

There is the special case of None being reserved for 0 that you have to 
be aware of (if it isn't in set, you are always > 0).


More information about the Digitalmars-d-announce mailing list