Howto not Full closure?
Michel Fortin
michel.fortin at michelf.com
Tue Nov 27 19:35:23 PST 2007
On 2007-11-27 13:59:25 -0500, Frank Benoit <keinfarbton at googlemail.com> said:
> I often use local functions and lambdas. I also often pass their
> address. And most of the time, i do this in environments, where i don't
> want use heap allocations.
>
> In my cases i know, that the function/method I call will not store the
> delegate address for later use. It will use it immediately.
>
> Is there a way to not heap allocate the stack frame?
> Is there a language feature missing to tell this to the compiler?
>
> For me, those local functions and lambdas are a really valueable and
> perfomant language feature. With the implied heap allocation this
> feature dies for me.
>
> Not taking the address or not referencing local variable is not an
> option for me.
Perhaps D needs "scope" inner functions.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list