Rikki's Borrow Checker

xoxorwr xororwr at gmail.com
Sun Aug 30 06:14:17 UTC 2026


On Sunday, 30 August 2026 at 03:46:08 UTC, Kapendev wrote:
> On Saturday, 29 August 2026 at 15:26:31 UTC, xoxorwr wrote:
>> 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.
>
> Technically, almost everything in that snippet is already in D.
>
> ---
>
>> Sometimes we make new friends along the way - monkyyy

Precisely. If it can already be expressed cleanly as with 
existing D constructs, why bother making it a language feature to 
begin with? And if does become a language feature, it should 
integrate with `switch`, bnot introduce a second mechanism.







More information about the Digitalmars-d mailing list