Can we fix this?

deadalnix deadalnix at gmail.com
Thu Sep 30 14:03:34 UTC 2021


On Thursday, 30 September 2021 at 11:32:28 UTC, Sebastiaan Koppe 
wrote:
> On Thursday, 30 September 2021 at 11:00:15 UTC, deadalnix wrote:
>> D either needs to ditch constructor, destruction, immutable, 
>> and anything that has to do with lifetime.
>
> I rather have closures that require you to state what you 
> capture.

I'm not sure what that buys. If you undercapture, you get an 
error, if you overcapture, you get suboptimal code.

On the other hand,t he compiler always exactly knows what you 
capture and what you do not capture, so it can make the optimal 
choice without you having to state anything.


More information about the Digitalmars-d mailing list