Value closures (no GC allocation)
Stanislav Blinov via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 20 17:49:23 PDT 2017
On Sunday, 21 May 2017 at 00:43:58 UTC, Adam D. Ruppe wrote:
>> What are your thoughts? Has something similar been proposed
>> before?
>
> It has, and I actually don't hate it, but I also don't think it
> is necessary because of the `scope` storage class being one
> option and just manually writing out the struct functor being
> another viable one. The c++ syntax sugar is nice, but I can
> live without it.
It's not just syntax sugar. We don't always need by-reference
captures. And it would be nice to be able to store the delegate
longer than current scope...
More information about the Digitalmars-d
mailing list