[swift-evolution] [Idea] Add blockreturn keyword
jtbandes at gmail.com
Wed Feb 17 19:32:58 CST 2016
Some previous discussion in "Pitch: @autoreleasepool attribute for loops":
On Wed, Feb 17, 2016 at 3:05 PM, Brent Royal-Gordon via swift-evolution <
swift-evolution at swift.org> wrote:
> > I often get “return blind” when looking at a method with blocks inside
> of it. I don’t know whether a return returns from the method or a block
> within that method. It would be nice to have a totally different keyword
> for blocks so I could distinguish the two.
> Without endorsing the idea, I'll suggest the `leave` keyword for this role.
> Of course, this also kind of suggests that we ought to support non-local
> returns, which I don't think is realistic.
> (Hmm. *Could* we support non-local returns from @noescape closures passed
> to rethrows functions?)
> Brent Royal-Gordon
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution