Can we fix this?

jfondren julian.fondren at gmail.com
Thu Sep 30 01:19:54 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.

He doesn't exactly that it's not a bug, but that some design that 
leads to it is desirable, and that some solutions are 
undesirable. Specifically this part:

>D closures are "by reference" rather than "by value". I make use 
>of it being by reference all the time, as well as it being much 
>more efficient. Changing it would likely break all sorts of code.

But the bugzilla issue isn't closed, he added the 'safe' keyword 
as it breaks immutability, and there's all kinds of language that 
accepts that this is a bug (edited to add emphasis):

>Here's a better illustration of __the problem__: ...

>The most practical __solution__ is ...

Very nice explanation with the while loops, btw.


More information about the Digitalmars-d mailing list