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).
  • From the D Bl... Mike Parker via Digitalmars-d-announce
    • Re: From... zjh via Digitalmars-d-announce
      • Re: ... zjh via Digitalmars-d-announce
    • Re: From... Max Samukha via Digitalmars-d-announce
      • Re: ... rassoc via Digitalmars-d-announce
      • Re: ... Walter Bright via Digitalmars-d-announce
        • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
        • ... Max Samukha via Digitalmars-d-announce
          • ... Walter Bright via Digitalmars-d-announce
    • Re: From... matheus via Digitalmars-d-announce
      • Re: ... Martyn via Digitalmars-d-announce
        • ... bachmeier via Digitalmars-d-announce
      • Re: ... Dom DiSc via Digitalmars-d-announce
        • ... matheus via Digitalmars-d-announce
          • ... Walter Bright via Digitalmars-d-announce
    • Re: From... user1234 via Digitalmars-d-announce
      • Re: ... matheus via Digitalmars-d-announce

Reply via email to