<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 Jan 5, 2016, at 16:06, Thorsten Seitz 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Am 05.01.2016 um 18:12 schrieb Matthew Johnson <<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>>:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" 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=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Jan 5, 2016, at 12:29 AM, Thorsten Seitz via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class="">I once suggested the following ternary like switch:<br class=""><br class="">let x = color ?<br class=""> case .Red: 0xFF0000<br class=""> case .Green: 0x00FF00<br class=""> case .Blue: 0x0000FF<span class="Apple-converted-space"> </span><br class=""> default: 0xFFFFFF<br class=""></blockquote><br class=""><br class=""></blockquote></blockquote></div></blockquote><div class=""><br class=""></div><div class="">Is anybody going to write up a proposal for the ternary-like switch expression?</div><div class=""><br class=""></div></div></div></div></blockquote><div class=""><br class=""></div>I’ll give it a try.</div></div></div></blockquote></div><br class=""><div class="">Any reason to not use switch let x = color … ? We already have if let, guard let, so I think switch let is pretty “swift-ly”.</div><div class=""><br class=""></div><div class="">:: marcelo.alves</div></body></html>