Rikki's Borrow Checker

xoxorwr xororwr at gmail.com
Sat Aug 29 15:26:31 UTC 2026


On Thursday, 27 August 2026 at 20:49:32 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> On 28/08/2026 8:35 AM, Walter Bright wrote:
>> https://github.com/dlang/dmd/pull/23572
>> 
>> Give it a whirl, and let us know what you think!
>
> Thanks Walter for the merge!
>
> This unblocks my sumtypes and matching DIP/PR.
>
> It'll allow me to solve for the following program corruption:
>
> ```d
> st.match {
> 	(ref v) => st = ST.init, v
> };
> ```

`match` with lambda syntax onto sumtypes is more inconsistent 
clutter this language doesn't need.

This will ruin D, yet again.

Pattern matching on sumtypes belongs in `switch`, it's a type 
switch, not justification for closures.




More information about the Digitalmars-d mailing list