<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 Mar 7, 2017, at 3:49 PM, Jaden Geller 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="">It’s worth mentioning that the normal let binding can be used for pattern matching:<div class=""><div style="margin: 0px 0px 0px 36.1px; text-indent: -36.1px; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="color: #c900a4" class=""> let</span> (a, b, c) <span style="color: #c800a4" class="">=</span> foo()</div></div><div class=""><br class=""></div><div class="">This nicely parallels the existing case syntax:</div><div class=""><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px; color: rgb(200, 0, 164);" class=""> if</span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px;" class=""> </span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px; color: rgb(200, 0, 164);" class="">case</span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px;" class=""> </span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px; color: rgb(201, 0, 164);" class="">let</span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px;" class=""> </span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px; color: rgb(200, 0, 164);" class="">.</span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px;" class="">blah(a, b, c) </span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px; color: rgb(200, 0, 164);" class="">=</span><span style="text-indent: -36.1px; font-family: Menlo; font-size: 13px;" class=""> bar() { … }</span></div><div class="">It would feel inconsistent if the order switched when in a conditional binding.</div><div class=""><br class=""></div><div class="">I would prefer that `case` was removed to best mirror the normal syntax, requiring `?` or `.some` to be used for optionals</div><div style="margin: 0px 0px 0px 36.1px; text-indent: -36.1px; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="color: #c800a4" class=""> if</span> <span style="color: #c900a4" class="">let</span> <span style="color: #c800a4" class="">.</span>blah(a, b, c) <span style="color: #c800a4" class="">=</span> bar() { … }</div><div style="margin: 0px 0px 0px 36.1px; text-indent: -36.1px; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="color: #c800a4" class=""> if</span> <span style="color: #c900a4" class="">let</span> unwrapped? <span style="color: #c800a4" class="">=</span> wrapped { … }</div><div style="margin: 0px 0px 0px 36.1px; text-indent: -36.1px; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="color: #c800a4" class=""> if</span> <span style="color: #c900a4" class="">let</span> <span style="color: #c800a4" class="">.</span>some(unwrapped) <span style="color: #c800a4" class="">=</span> wrapped { … }</div><div class="">but I realize this is source-breaking, so I’m happy with the existing syntax.</div></div></div></blockquote><br class=""></div><div>We tried `if let unwrapped? = wrapped` some time ago. It was unbelievably unpopular. We changed it back.</div><div><br class=""></div><div><br class=""></div><div>-- </div><div>Greg Parker <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a> Runtime Wrangler</div><div><br class=""></div><div><br class=""></div></body></html>