> On Jul 10, 2017, at 1:51 AM, David Hart via swift-evolution 
> <[email protected]> wrote:
> 
> I know we can’t do much about it now, but if optional binding had used the 
> same syntax as it does in pattern matching, we wouldn’t be having this 
> discussion:
> 
> guard let x = try doSomething() catch {
>     // handle error
> }
> 
> guard let x? = doSomething() else {
>     // handle when nil
> }

We tried pattern-matching syntax in `if let` a while ago. It was unbelievably 
unpopular. We changed it back.


-- 
Greg Parker     [email protected] <mailto:[email protected]>     Runtime 
Wrangler


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to