<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I also agree with this. &nbsp;I see no value in different syntax for statements and expressions, just unnecessary complexity.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Modifying the current syntax is an orthogonal issue. &nbsp;If anyone feels the current switch syntax is to verbose I would recommend writing a new proposal to change it. &nbsp;If such a proposal were adopted the new syntax should be used for both statements and expressions.<br><br>Sent from my iPhone</div><div><br>On Dec 6, 2015, at 4:14 PM, Alex Lew via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">👍</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 5:12 PM, <a href="mailto:thorsten@portableinnovations.de">thorsten@portableinnovations.de</a> <span dir="ltr">&lt;<a href="mailto:thorsten@portableinnovations.de" target="_blank">thorsten@portableinnovations.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>Absolutely. Just the same rule: parts that were statements must be expressions. The else clause becomes mandatory.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Thorsten&nbsp;</div></font></span><div><div class="h5"><div><br>Am 06.12.2015 um 22:52 schrieb Alex Lew &lt;<a href="mailto:alexl.mail+swift@gmail.com" target="_blank">alexl.mail+swift@gmail.com</a>&gt;:<br><br></div><blockquote type="cite"><div><div dir="ltr">I agree that it's simplest to just reuse switch keyword, and keep braces. +1. &nbsp;<div><br></div><div>Would you allow the same thing with if?<div><br></div><div>let thisColor = if condition { .Red } else { .Blue }</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 4:44 PM, Rudolf Adamkovic <span dir="ltr">&lt;<a href="mailto:salutis@me.com" target="_blank">salutis@me.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>&gt; On 06 Dec 2015, at 22:35, thorsten--- via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; I would prefer the expression to match the statement. The only difference would be that all parts that were statements now have to be expressions.<br>
<br>
</span>+1<br>
<span><br>
&gt;<br>
&gt; Therefore the switch-expression should simply look like follows:<br>
&gt;<br>
&gt; let thisColor = switch thatColor {<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case .Red: .Green // must be an expression<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default: .Yellow&nbsp; &nbsp; &nbsp; // must be an expression<br>
&gt;&nbsp; &nbsp; &nbsp;}<br>
&gt;<br>
&gt; No returns needed in the case clauses.<br>
<br>
</span>This actually looks great. One simple rule and zero new keywords.<br>
<br>
Readable and simple to learn.<br>
<br>
Fantastic!<br>
<span><br>
&gt; Formatting this as a one-liner would just require adding semicolons (though I wouldn't recommend this).<br>
&gt;<br>
&gt; -Thorsten<br>
</span><div><div>&gt; _______________________________________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAefb3WNhLtFxyUhVNc2UXY-2B1RWm-2FimrPwPwfH4BiyAr9ll-2F6E-2FM76eKK0CswC2w4i5yR2JYnTBqLIdlYVz6YUu8Zr9TYvF8acXdtBZS-2FC6uIO8zAQi4bLXkEXA-2FWsBJ119-2Ffhv-2BaLEUCQ6z2eSI-2BCX-2BXMVOxkrrKaDPJwTLULdgbLx42co78lDSJah4sd-2FGfPE-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;">
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>