First Draft: Nominal Sum Types via `enum union` and `switch` Expressions

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Sep 14 16:11:27 UTC 2026


On 15/09/2026 4:04 AM, Nick Treleaven wrote:
> On Monday, 14 September 2026 at 06:35:13 UTC, Meta wrote:
>> I was inspired by Rikki's DIP (https://forum.dlang.org/post/ 
>> nhbiwarfrlqqffegkhsf at forum.dlang.org) to write my own that introduces 
>> sum types from a different direction that I feel is more "D-like". It 
>> borrows heavily from Rust and Swift's version of the feature.
> 
> Somewhat like Rikki's DIP, I think this is too complex for a first DIP. 
> It would be better to focus on the core functionality and extend it 
> later. Some of this could maybe be marked as plans for later enhancements.
Been there, done that. Not trying again, I would not recommend it.



More information about the dip.development mailing list