Opt-out closures

Jacob Carlborg doob at me.com
Sun Jan 23 11:35:45 PST 2011


On 2011-01-23 16:08, bearophile wrote:
> Sean Eskapp:
>
>> I want to be able to access the enclosing scope, but NOT after the function has
>> exited; I should have the option of accessing the enclosing scope, but at the cost
>> of making my delegate not a closure.
>
> It seems a worth thing to ask for. A possible syntax (not currently supported):
>
> void foo() {
>      scope void bar() {}
> }
>
> Bye,
> bearophile

Doesn't D2 have scoped delegates, at last as a parameter to a function?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list