[swift-evolution] [Idea] Add blockreturn keyword
Brent Royal-Gordon
brent at architechies.com
Wed Feb 17 17:05:05 CST 2016
> 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
More information about the swift-evolution
mailing list