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

BJ Homer bjhomer at gmail.com
Wed Oct 11 13:48:12 CDT 2017


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 <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 <swift-evolution at swift.org> 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 at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171011/3bf8b55d/attachment.html>


More information about the swift-evolution mailing list