Tsoding - How Not to Market Your Language Features
Derek Fawcus
dfawcus+dlang at employees.org
Wed Apr 2 17:01:56 UTC 2025
On Wednesday, 2 April 2025 at 15:16:43 UTC, Timon Gehr wrote:
> 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`.
I can't point to the timestamp, but FWIW I do recall seeing
something similarly dubious while he was coding.
More information about the Digitalmars-d
mailing list