Let's get the semantic around closure fixed.

Adam D. Ruppe destructionator at gmail.com
Wed May 19 19:59:04 UTC 2021


On Wednesday, 19 May 2021 at 19:48:52 UTC, Steven Schveighoffer 
wrote:
> If we defensively allocate for the delegate, this is going to 
> allocate every iteration of someLargeThing, even though it's 
> very rare that it will need to.

Yeah, it could just allocate when the assignment is made for 
cases like that, which is what the current

      dg = ((i)=>(){return  i;})(i);

pattern does.


Which I actually don't mind at all myself.


More information about the Digitalmars-d mailing list