Tsoding - How Not to Market Your Language Features

Derek Fawcus dfawcus+dlang at employees.org
Wed Apr 2 17:26:59 UTC 2025


On Wednesday, 2 April 2025 at 17:01:56 UTC, Derek Fawcus wrote:
> 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.

OK - checking again, I can see the "non shadow" instance you 
mention.

I can see how I would have misinterpreted what he was doing while 
he was chopping and changing in his code. Maybe it was the same 
for Patrick?

(A version of the code can also be seen at 1:15:54)




More information about the Digitalmars-d mailing list