> On 8 Mar 2017, at 03:27, Greg Parker via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
>> On Mar 7, 2017, at 3:49 PM, Jaden Geller via swift-evolution 
>> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> 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.

Who was it unpopular with? We’re talking about people inside Apple before Swift 
was released, right?

> -- 
> Greg Parker     gpar...@apple.com <mailto:gpar...@apple.com>     Runtime 
> Wrangler
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to