> On Oct 31, 2016, at 1:22 PM, William Sumner via swift-evolution > <swift-evolution@swift.org> wrote: > > >> On Oct 31, 2016, at 1:11 PM, Kenny Leung via swift-evolution >> <swift-evolution@swift.org> wrote: >> >> OK then, how about an extension to the proposal that says “guard variable >> always implies guard unwrap variable when the only thing present in the >> guard clause is an optional or list of optionals”? >> >> So you could write >> >> guard foo else { >> } >> >> guard foo, bar else { >> } >> >> -Kenny > > > That would enable some strange-looking code: > > var foo: Bool? > guard foo, foo else {} > > Preston > _______________________________________________ > swift-evolution mailing list > swift-evolution@swift.org > https://lists.swift.org/mailman/listinfo/swift-evolution
I missed the part where you require only optionals in the clause. However, I still don’t like the visual ambiguity between testing boolean expressions and unwrapping optionals. Preston _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution