[swift-evolution] Modernize Switch/Case Statements?

Thorsten Seitz tseitz42 at icloud.com
Sun Jan 31 02:34:49 CST 2016



> Am 30.01.2016 um 10:39 schrieb Haravikk via swift-evolution <swift-evolution at swift.org>:
> 
> Actually, one thing we don’t have in Swift is the ability to just put blocks (curly braces) wherever we like, which in some languages is a useful tool for variable scope when you know you only need something for a short time, but might want to re-use the name.

You can use a "do" block for that.

do { ... }

-Thorsten 


More information about the swift-evolution mailing list