[swift-evolution] [Idea] Add blockreturn keyword

Jacob Bandes-Storch 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
> Architechies
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160217/e2a6066a/attachment.html>

More information about the swift-evolution mailing list