I implemented delegates in D

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 9 15:17:11 PDT 2016


On 6/9/16 6:06 PM, Mathias Lang via Digitalmars-d wrote:
> To avoid the delegate being GC allocated, use `scope foo = (int i) { ...
> }` at call site.

Is that true? At one point in D's past, this ONLY worked if you passed a 
delegate to a function accepting a scope delegate. Maybe it's been fixed.

-Steve


More information about the Digitalmars-d mailing list