<div dir="ltr">+1 I personally really like the if then expression. I think is cleaner and this way we can have if else expressions with curly braces too. Introducing the then keyword also could allow for switch expressions. <div><br></div><div>let result = <span style="font-family:Menlo;font-size:11px;color:rgb(187,44,162)">switch</span><span style="font-family:Menlo;font-size:11px;color:rgb(0,0,0)"> (</span><span style="font-family:Menlo;font-size:11px;color:rgb(0,0,0)">yourColor</span><span style="font-family:Menlo;font-size:11px;color:rgb(0,0,0)">) {</span></div><div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(187,44,162)">case</span> .Red <span style="color:rgb(187,44,162)">then</span> 1</div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(187,44,162)">case</span> .Green <font color="#bb2ca2">then</font> 2</div><div style="margin:0px;font-size:11px;font-family:Menlo"> <span style="color:rgb(187,44,162)">case</span> .Blue <span style="color:rgb(187,44,162)">then</span> 3</div></div><div style="margin:0px;font-size:11px;font-family:Menlo"><span style="color:rgb(49,89,93)"> }</span></div><div style="margin:0px;font-size:11px;font-family:Menlo"><span style="color:rgb(49,89,93)"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 5:31 PM, Al Skipp via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How about:<br>
<br>
let v = if condition then “A" else “B"<br>
<br>
No mysterious symbols or braces, or multiline monstrosity.<br>
<span class="im HOEnZb"><br>
> On 12 Dec 2015, at 01:18, Andrey Tarantsov via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
> Strong -1; this turns a quick one-liner into a multiline monstrosity. When massaging coordinates and layouts in iOS apps, ?: is often helpful to handle corner cases inline.<br>
><br>
> A.<br>
><br>
</span><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> swift-evolution mailing list<br>
> <a href="mailto:swift-evolution@swift.org">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>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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>
</div></div></blockquote></div><br></div>