Fallthrough ceases to make much sense with braces, and it is a handy feature of switch statements every so often.<br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 7, 2016 at 15:31 Roth Michaels via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jul 07 2016 at 04:07:06 PM, G B via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
> I feel like this would be more consistent with the rest of the syntax:<br>
><br>
> switch x {<br>
> case 0 { print(0) }<br>
> case 1 { print(1) }<br>
> case 2 { print(2) }<br>
> default { print("other”) }<br>
> }<br>
><br>
> The colon syntax evokes a label, but the modern, complex `case`<br>
> statements in Swift don’t act much like labels.<br>
<br>
I sort of see what you are saying about `case` not seeming like a label<br>
since we don't have GOTO in Swift.<br>
<br>
I prefer the colon vs your brace suggestion, because from my<br>
perspective, the `switch` expression is the control flow statement and<br>
to the cases are like some sort of label even if they include complex<br>
pattern matching.<br>
<br>
While Scala drops the colon to avoid case statements looks like labels,<br>
but uses => instead of whitespace and {} --- I prefer this to your<br>
suggestion, but as I said also think the colon is fine.<br>
<br>
--<br>
Roth Michaels<br>
<a href="mailto:roth@rothmichaels.us" target="_blank">roth@rothmichaels.us</a><br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>