Value closures (no GC allocation)

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Sat May 20 18:30:51 PDT 2017


On Sunday, 21 May 2017 at 00:49:23 UTC, Stanislav Blinov wrote:
> And it would be nice to be able to store the delegate longer 
> than current scope...

Important to note that this thing won't be a delegate, since 
delegates don't have room to store by-value captures. It can 
still be passed to isCallable templates and such, but it will be 
a struct of some sort, and you *can* write out the struct now, it 
just has more tedious syntax.

I don't object to the C++ syntax being added though, I just want 
to remind everyone that the result is possible with a struct.


More information about the Digitalmars-d mailing list