As a result of Apple's mistake earlier this year related to curly braces missing around an
if
body, in their new language,
swift, curly braces are not optional for
if
,
else
,
for
,
for-in
,
while
or
do-while
statements. They are required and the compile will complain if they are omitted.