Tsoding - How Not to Market Your Language Features

Timon Gehr timon.gehr at gmx.ch
Wed Apr 2 15:16:43 UTC 2025


On 3/31/25 13:23, Patrick Schluter wrote:
> On Thursday, 27 March 2025 at 14:21:11 UTC, Ali Çehreli wrote:
>> I haven't watched it yet. I'm just attempting to beat you to announce 
>> it. :p
>>
>>   https://www.youtube.com/watch?v=_kRsbu82zqs
>>
>> Ali
> 
> I was wondering. At around 1:20:00 he is experimenting with opApply() to 
> make his Array foreach-able. He makes an obvious error of shadowing i 
> parameter with the loop index i. I was wondering why the compiler didn't 
> catch this shadowing as it does in general do recognize shadowed variables.

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`.


More information about the Digitalmars-d mailing list