> On Mar 7, 2017, at 3:49 PM, Jaden Geller via swift-evolution > <[email protected]> wrote: > > It’s worth mentioning that the normal let binding can be used for pattern > matching: > let (a, b, c) = foo() > > This nicely parallels the existing case syntax: > if case let .blah(a, b, c) = bar() { … } > It would feel inconsistent if the order switched when in a conditional > binding. > > I would prefer that `case` was removed to best mirror the normal syntax, > requiring `?` or `.some` to be used for optionals > if let .blah(a, b, c) = bar() { … } > if let unwrapped? = wrapped { … } > if let .some(unwrapped) = wrapped { … } > but I realize this is source-breaking, so I’m happy with the existing syntax.
We tried `if let unwrapped? = wrapped` some time 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
