Tsoding - How Not to Market Your Language Features

Patrick Schluter Patrick.Schluter at bbox.fr
Thu Apr 3 09:06:15 UTC 2025


On Wednesday, 2 April 2025 at 17:34:11 UTC, Walter Bright wrote:
> On 4/2/2025 8:16 AM, Timon Gehr wrote:
>> Can you show the code that you mean or give a more accurate 
>> time stamp? I only see the _delegate's_ parameter `i` at 
>> 1:19:41, which does not lead to shadowing, as the only actual 
>> parameter in scope within `opApply` is `dg`.
>
> The foreach of an opapply is rewritten by dmd into a delegate. 
> If the shadowing is not detected, this would be why.

There was no shadowing. It only looked like one when glancing 
quickly over the code. My bad.

>
> I actually regret this design. It's overly complex, and I 
> always have to look up how to write an opApply function.
>
> It could be done with ranges, if the ranges internally 
> implemented some sort of stack.




More information about the Digitalmars-d mailing list