Enumerated Unions (sum types)

Dukc ajieskola at gmail.com
Thu Sep 12 09:49:51 UTC 2024


On Thursday, 12 September 2024 at 09:40:14 UTC, Dukc wrote:
> Likewise, we should have a generic setter function for all the 
> sum types that type safely checks the tag, and runs the 
> destructor of the old object if the assignment changes the type.

Correction: I think the destructor should run any time the tag 
changes, even if the new field has the same type as the old one.




More information about the dip.ideas mailing list