Second draft: Sum Type by Struct

Per Nordlöw per.nordlow at gmail.com
Sat Sep 12 21:35:13 UTC 2026


On Saturday, 12 September 2026 at 21:29:50 UTC, Per Nordlöw wrote:
> On Saturday, 12 September 2026 at 18:36:35 UTC, Richard (Rikki) 
> Andrew Cattermole wrote:
>> And quite frankly nobody is implementing this. Its not how 
>> struct & union field layouting works.

I say we write in the DIP-spec that the developer must be 
prepared to in the future handle the case that the discriminator 
tag is a bitfield with size <= 7, typically <= 3 for GC 
compliance, rather than a `ubyte`. For the sake of being able to 
enable that kind of optimization later on.


More information about the dip.development mailing list