draft proposal for Sum Types for D

Walter Bright newshound2 at digitalmars.com
Tue Nov 29 20:04:24 UTC 2022


On 11/29/2022 9:14 AM, Steven Schveighoffer wrote:
> On 11/29/22 1:26 AM, Walter Bright wrote:
>> Go ahead, Make My Day! Destroy!
>>
>> https://github.com/WalterBright/DIPs/blob/sumtypes/DIPs/1NNN-(wgb).md
> 
> In Prior work, I suggest adding 
> [TaggedAlgebraic](https://github.com/s-ludwig/taggedalgebraic) and I also 
> suggest reading about how it works. I find it much nicer to use than std.sumtype.
> 
> In the DIP, it says that "Member functions of field declarations are restricted 
> the same way union member functions are." What does this mean? I can't find any 
> information on this in the spec.
> 
> An example of what is not allowed would be helpful.
> 
> -Steve

I thought it mentioned that copy constructors, postblits, and destructors are 
not allowed.


More information about the Digitalmars-d mailing list