draft proposal for Sum Types for D

Timon Gehr timon.gehr at gmx.ch
Tue Nov 29 14:51:34 UTC 2022


On 11/29/22 07:26, Walter Bright wrote:
> Go ahead, Make My Day! Destroy!
> 
> https://github.com/WalterBright/DIPs/blob/sumtypes/DIPs/1NNN-(wgb).md

Another thing to consider:

sumtype A{
     int a;
     B b;
}

sumtype B{
     int c;
     int d;
}

Is the following allowed?

A a;
...
if(?a.b.c){ ... }


More information about the Digitalmars-d mailing list