Opt-out closures

2011-01-23 Thread Sean Eskapp
I get errors when working with nested functions and structs or scoped classes, because closures can't be used with anything with scoped destruction. This makes complete sense, but I don't even want the closure functionality of these nested functions. Personally, I would like to be able to opt-out

Re: Opt-out closures

2011-01-23 Thread Jonathan M Davis
On Sunday 23 January 2011 06:36:27 Sean Eskapp wrote: I get errors when working with nested functions and structs or scoped classes, because closures can't be used with anything with scoped destruction. This makes complete sense, but I don't even want the closure functionality of these nested

Re: Opt-out closures

2011-01-23 Thread Sean Eskapp
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Sunday 23 January 2011 06:36:27 Sean Eskapp wrote: I get errors when working with nested functions and structs or scoped classes, because closures can't be used with anything with scoped destruction. This makes complete

Re: Opt-out closures

2011-01-23 Thread Sean Eskapp
== Quote from bearophile (bearophileh...@lycos.com)'s article 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

Re: Opt-out closures

2011-01-23 Thread bearophile
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

Re: Opt-out closures

2011-01-23 Thread bearophile
Andrew Wiley: 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? I have written that without too much thinking, so I'm sure that's not a

Re: Opt-out closures

2011-01-23 Thread Torarin
2011/1/23 Sean Eskapp eatingstap...@gmail.com: 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. Until we have a dedicated syntax for it, I

Re: Opt-out closures

2011-01-23 Thread Jacob Carlborg
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

Re: Opt-out closures hack

2011-01-23 Thread Sean Eskapp
== Quote from Torarin (torar...@gmail.com)'s article 2011/1/23 Sean Eskapp eatingstap...@gmail.com: 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