[swift-evolution] guard let x = x
    Charlie Monroe 
    charlie at charliemonroe.net
       
    Tue Nov  1 00:55:17 CDT 2016
    
    
  
Isn't this ambiguous in case x is Bool? (Optional<Bool>)? Do you mean to force-unwrap the bool and use it as a condition, or should the x be unwrapped (in which case it can be false)?
Not a common case likely, but it is nevertheless something to think of.
> On Nov 1, 2016, at 6:52 AM, David Sweeris via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Between all the talk about unwrap and nonnill and whatnot, I've kinda lost track of what we're actually talking about. I think it's still about not having to type variables twice in guard statements, right? Has anyone suggested
>    guard x! else {...}
>    // x means x! now
> yet?
> 
> - Dave Sweeris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
    
    
More information about the swift-evolution
mailing list