I disagree that the following is better<br><br>guard unwrap foo else { ... } // simpler?<br><br>It feels like you are re-using foo which previously was an optional but now is something else.  If a variable is a cup,  then you&#39;d be reusing a cup that previously had a different drink in it.<br><br>guard let foo = foo else { ... } // current<br><br>The current version is preferred since it looks like you are using a new &quot;cup&quot; to store your non-optional.  I like that it is explicit.<br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 7, 2017 at 9:27 PM Greg Parker via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Mar 7, 2017, at 3:49 PM, Jaden Geller via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_6260410015938318752Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="word-wrap:break-word" class="gmail_msg">It’s worth mentioning that the normal let binding can be used for pattern matching:<div class="gmail_msg"><div style="margin:0px 0px 0px 36.1px;font-size:13px;line-height:normal;font-family:Menlo" class="gmail_msg"><span style="color:#c900a4" class="gmail_msg">  let</span> (a, b, c) <span style="color:#c800a4" class="gmail_msg">=</span> foo()</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This nicely parallels the existing case syntax:</div><div class="gmail_msg"><span style="font-family:Menlo;font-size:13px;color:rgb(200,0,164)" class="gmail_msg">  if</span><span style="font-family:Menlo;font-size:13px" class="gmail_msg"> </span><span style="font-family:Menlo;font-size:13px;color:rgb(200,0,164)" class="gmail_msg">case</span><span style="font-family:Menlo;font-size:13px" class="gmail_msg"> </span><span style="font-family:Menlo;font-size:13px;color:rgb(201,0,164)" class="gmail_msg">let</span><span style="font-family:Menlo;font-size:13px" class="gmail_msg"> </span><span style="font-family:Menlo;font-size:13px;color:rgb(200,0,164)" class="gmail_msg">.</span><span style="font-family:Menlo;font-size:13px" class="gmail_msg">blah(a, b, c) </span><span style="font-family:Menlo;font-size:13px;color:rgb(200,0,164)" class="gmail_msg">=</span><span style="font-family:Menlo;font-size:13px" class="gmail_msg"> bar() { … }</span></div><div class="gmail_msg">It would feel inconsistent if the order switched when in a conditional binding.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">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;font-size:13px;line-height:normal;font-family:Menlo" class="gmail_msg"><span style="color:#c800a4" class="gmail_msg">  if</span> <span style="color:#c900a4" class="gmail_msg">let</span> <span style="color:#c800a4" class="gmail_msg">.</span>blah(a, b, c) <span style="color:#c800a4" class="gmail_msg">=</span> bar() { … }</div><div style="margin:0px 0px 0px 36.1px;font-size:13px;line-height:normal;font-family:Menlo" class="gmail_msg"><span style="color:#c800a4" class="gmail_msg">  if</span> <span style="color:#c900a4" class="gmail_msg">let</span> unwrapped? <span style="color:#c800a4" class="gmail_msg">=</span> wrapped { … }</div><div style="margin:0px 0px 0px 36.1px;font-size:13px;line-height:normal;font-family:Menlo" class="gmail_msg"><span style="color:#c800a4" class="gmail_msg">  if</span> <span style="color:#c900a4" class="gmail_msg">let</span> <span style="color:#c800a4" class="gmail_msg">.</span>some(unwrapped) <span style="color:#c800a4" class="gmail_msg">=</span> wrapped { … }</div><div class="gmail_msg">but I realize this is source-breaking, so I’m happy with the existing syntax.</div></div></div></blockquote><br class="gmail_msg"></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">We tried `if let unwrapped? = wrapped` some time ago. It was unbelievably unpopular. We changed it back.</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-- </div><div class="gmail_msg">Greg Parker     <a href="mailto:gparker@apple.com" class="gmail_msg" target="_blank">gparker@apple.com</a>     Runtime Wrangler</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>