<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="">Going back to the originating message of this thread. This idea (or a variant thereof) has been mentioned in the list of Commonly Rejected Proposals (2nd last bullet under <a href="https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md#control-flow-closures-optional-binding-and-error-handling" class="">Control Flow, Closures, Optional Binding, and Error Handling</a>):<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160829/026796.html" class="">Syntactic sugar for if let self-assignment</a>: An alternative syntax (such as if let foo? { ... } or if let foo=? { ... }) to serve as a shorthand for if let foo = foo { ... } is often proposed and rejected because it is favoring terseness over clarity by introducing new magic syntactic sugar.</blockquote><br class=""></div><div class="">So any discussion on this topic would have to target these concerns first.</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On 26 Oct 2016, David Goodine 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=""><div class="">I was typing the above (for the hundredth time) the other day and I was wondering whether it might be worth considering offering a shorter syntax:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">guard let x, y, z else {…}</font></div></div></div></blockquote></div><div><br class=""></div><div class="">That said, while I don't mind having to repeat the variable name myself, I think David Goodine's syntax would have to repeat the `let` to align with <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md" class="">SE-0099</a>, like so:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""> <b class="">guard let</b> x, <b class="">let</b> y, <b class="">let</b> z <b class="">else</b> { ... }</font></div><div class=""><br class=""></div><div class="">Personally, I wouldn't mind if this syntax existed. I think it explains itself rather well. And today, unlike when it was first discussed a long time before SE-0099, it's no longer confusable with Boolean conditions.</div><div class=""><br class=""></div><div class="">But it's certainly out of scope for Swift 4 phase 1.</div><div class=""><br class=""></div><div class=""><div class="">— Pyry</div></div><div class=""><br class=""></div></body></html>