Confusion about dynamically and lexically scoped closures

ParticlePeter via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Nov 8 15:45:13 PST 2015


On Sunday, 8 November 2015 at 23:17:06 UTC, Jakob Ovrum wrote:
> The closures for delegates in D1 are never automatically copied 
> to the heap, while in D2 this is done when it's determined that 
> the delegate might outlive one of its upvalues.
>
> So, I think it's safe to say we have lexical closures in D2 but 
> only dynamic closures in D1 and the language specification is 
> out of date.

Thanks, makes sens, I assumed a typo in the docs.


More information about the Digitalmars-d-learn mailing list