<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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 15, 2015, at 8:32 AM, Dennis Lysenko 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 dir="ltr" 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;" class="">I hate to triple-post, but removing ternary seems similar to the 'removing c-style for loops' proposal that was recently accepted: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0007-remove-c-style-for-loops.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0007-remove-c-style-for-loops.md</a><div class=""><br class=""></div><div class="">To quote:</div><div class=""><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; line-height: 25.6px;" class="">The C-style </span><code style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51); background-color: rgba(0, 0, 0, 0.0392157);" class="">for-loop</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; line-height: 25.6px;" class=""> appears to be a mechanical carry-over from C rather than a genuinely Swift-specific construct. It is rarely used and not very Swift-like.</span><br class=""></div><div class=""><br class=""></div><div class="">You could say the same thing about ternary. Rarely used; not very Swift-like, conflicting with the use of ? for optionals; seems to be disliked (rationally or irrationally) by many; and in almost all cases you can achieve the same exact thing, but ostensibly more readable, with a few extra lines.</div></div></div></blockquote><br class=""></div><div>There are significant differences though: C style for loop is almost never used (and many people chimed in to say that they had *zero* uses in their code), but ternary is widely used. In order to remove ternary, we’d need to have something to replace it with, which is the topic of much of this thread. IMO, in order to consider removing ternary, we’d have to introduce something that is *better* than the current ternary operator first.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>