Re: [swift-evolution] [Proposal] implicit `if let`

2017-10-11 Thread BJ Homer via swift-evolution
This has been proposed and rejected a few times, actually. You can see it in 
the Swift-Evolution “Commonly Rejected Changes” document here: 
https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md 


-BJ

> On Oct 11, 2017, at 12:29 PM, Manuel Carrasco Molina via swift-evolution 
>  wrote:
> 
> Hi,
> 
> We usually do this
> 
> If let foo = foo {
> // bar
> }
> 
> What if the compiler would understand
> 
> If let foo {
> // bar
> }
> 
> As if the `= foo` would be there?
> 
> I’d find it great syntactic sugar.
> ___
> 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


[swift-evolution] [Proposal] implicit `if let`

2017-10-11 Thread Manuel Carrasco Molina via swift-evolution
Hi,

We usually do this

If let foo = foo {
// bar
}

What if the compiler would understand

If let foo {
// bar
}

As if the `= foo` would be there?

I’d find it great syntactic sugar.
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution