The future of lambda delegates

Russ Lewis spamhole-2001-07-16 at deming-os.org
Thu Aug 24 11:50:24 PDT 2006


BCS wrote:

> because this is so much slower, I would hate to see it happen silently. 
> Having a function use a heap-frame just because I add a delegate could 
> cause some hard to track down performance hits. I would advocate making 
> the escaping delegate illegal unless the code explicitly says to put 
> /part/ or all of the frame on the heap.

Wow, the concept of putting only *part* of the frame on the heap really 
blew my mind.  It suggests the following syntax:

void foo() {
   int a;   // on stack

   heap {  // all variables in this scope on the heap
     ...stuff...
   }
}



More information about the Digitalmars-d mailing list