The future of lambda delegates
Bruno Medeiros
brunodomedeirosATgmail at SPAM.com
Wed Aug 16 15:40:10 PDT 2006
Sean Kelly wrote:
>> An ideal solution would be if the compiler could statically detect if
>> a nested class reference can 'escape' the stack frame, and only then
>> allocate on the heap. Otherwise, the current (very efficient) method
>> of just passing a frame pointer would be employed.
>
> Agreed. As well as detect whether the delegates reference any local
> stack data in the first place. The alternative would be to use a
> separate keyword for these delegates, 'closure' or 'lambda' or some
> such, but that's potentially confusing, and leaves anonymous delegates
> in an odd position.
>
Uh, shouldn't such keyword be applied to the function whose frame *is
used*, rather than the function(delegate) that uses the outer frame?
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list