Opt-out closures

bearophile bearophileHUGS at lycos.com
Sun Jan 23 07:08:58 PST 2011


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


More information about the Digitalmars-d mailing list