Opt-out closures

Andrew Wiley debio264 at gmail.com
Sun Jan 23 09:34:30 PST 2011


On Sun, Jan 23, 2011 at 9:08 AM, bearophile <bearophileHUGS at lycos.com>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() {}
> }
>
>
I don't like being too negative, but if we're removing "scope" as a storage
class because it can leave unsafe dangling pointers, how likely is it that
we'll get delegates that can have dangling pointers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110123/e94cd966/attachment.html>


More information about the Digitalmars-d mailing list