Can we fix this?

Imperatorn johan_forsberg_86 at hotmail.com
Thu Sep 30 13:23:06 UTC 2021


On Thursday, 30 September 2021 at 01:00:40 UTC, deadalnix wrote:
> On Wednesday, 29 September 2021 at 16:23:34 UTC, Imperatorn 
> wrote:
>> I'm still a bit confused. What is the recommended approach 
>> here? Should we fix the language or have best 
>> practices/documentation on how to "work around" the problem.
>
> I'm afraid this topic has come again and again, and Walter 
> consistently says that it is not a bug, so we are stuck 
> complaining. Maybe you can convince him.

Maybe, idk.

But I don't understand why we can't just do what (for example) C# 
does.

No var in loop = closure captures the variable
var in loop = closure captures the value of the variable

Sounds to me like a pretty "easy" thing to fix (if one could 
agree that such a solution would be acceptible)


More information about the Digitalmars-d mailing list