Add GC-free closures to D, similar to the ones C++ has

a11e99z black80 at bk.ru
Thu Sep 5 15:22:17 UTC 2019


On Thursday, 5 September 2019 at 15:17:04 UTC, a11e99z wrote:
> On Thursday, 5 September 2019 at 14:46:08 UTC, James Lu wrote:
>> Add GC-free closures to D. Less GC reliance means less memory 
>> fragmentation, enabling lower-level uses of D to use closures.
>>
>>     // more complicated but noGC version
>>     //return zip( r, n.repeat).map!( z => z[0]*z[1]);

more complicated visually and thoughtful but machine code 
probably simpler and faster


More information about the Digitalmars-d mailing list