draft proposal for Sum Types for D

Timon Gehr timon.gehr at gmx.ch
Tue Nov 29 14:56:16 UTC 2022


On 11/29/22 14:45, rikki cattermole wrote:
> 
> "Members of sumtypes cannot have copy constructors, postblits, or 
> destructors."
> 
> Kills reference counting, can't use it. Can't use it for value typed 
> exceptions as the underlying sum type implementation. Not good enough. 
> Note when these are not defined you can optimize the copying to be just 
> mov's.
> 

Oof. Missed that bit. Yes, that limitation won't fly. This must be 
supported.



More information about the Digitalmars-d mailing list