[swift-evolution] [Draft] Tuple-Based Compound Optional Binding
clattner at apple.com
Wed Jun 22 01:13:53 CDT 2016
> On Jun 21, 2016, at 11:11 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>> On Jun 12, 2016, at 4:46 AM, Brent Royal-Gordon <brent at architechies.com <mailto:brent at architechies.com>> wrote:
>> When I suggested this syntax in the acceptance thread for SE-0099, Chris said it should be written up as a proposal. I'm sure this will get lost in the WWDC shuffle, but here goes.
> Hi Brent,
> I’m sorry that I haven’t had time yet to read the down thread responses, but I don’t see how this can work:
> “if let pattern = expr” is sugar for “if case let pattern? = expr”, so this would either:
> a) only apply to tuple literals on the right side or
> b) not work, since this syntax above already means “if case let (a,b,c)? = expr”.
Sorry, I mean that:
"if let (a, b, c) = expr”
“if case let (a,b,c)? = expr”
since “expr” can be an optional tuple.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution