Re: Confusion about dynamically and lexically scoped closures

2015-11-08 Thread ParticlePeter via Digitalmars-d-learn
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

Confusion about dynamically and lexically scoped closures

2015-11-08 Thread ParticlePeter via Digitalmars-d-learn
Hi, the confusion starts here: http://dlang.org/function.html#closures End of paragraph bellow the last delegate example: "This combining of the environment and the function is called a dynamic closure." While according to https://en.wikipedia.org/wiki/Scope_%28computer_science%29 "Lexical