[swift-evolution] Proposal: Make braces optional much like semicolons.
Bart Whiteley
bwhiteley at gmail.com
Sun Dec 20 10:44:55 CST 2015
On Sun, Dec 20, 2015 at 8:17 AM, Amir Michail via swift-evolution
<swift-evolution at swift.org> wrote:
> // braces are optional here but you could still put them in if you want to
> for i in 0..<10
> for j in 0..<5
> if i % 2 == 0
> print(i+j)
> print(i*j)
>
-1. Please no. The fact that Swift requires curly braces even in
situations where C does not is a great feature. I still remember the
cheer that erupted from the '14 WWDC crowd when mandatory braces were
announced -- and rightfully so. Many bugs are prevented by mandatory
braces.
More information about the swift-evolution
mailing list