<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 13, 2015, at 8:11, Jakob Egger via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">But there is one good side to this proposal: it nests more naturally than the ternary operator:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">"if cond then expr1 else if cond2 then expr2 else expr3"</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">vs.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">"cond ? expr1 : (cond2 ? expr2 : expr3)</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Without commenting on anything else in this thread, ?: nests properly (right-associative-ly) in every language <a href="http://www.phpsadness.com/sad/30" class="">other than PHP</a>. Dropping the parens there is equivalent.</div><div class=""><br class=""></div><div class="">(That said, if I hadn't known that already it wouldn't have been something I could infer from the syntax. I'd have to assume the author knew what they were doing. And I'm the sort who will parenthesize && expressions within || expressions, even though it's not strictly necessary.)</div><div class=""><br class=""></div><div class="">Jordan</div></body></html>