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).