> On May 13, 2016, at 12:23 PM, Joe Groff <[email protected]> wrote: > > >> On May 13, 2016, at 11:15 AM, Erica Sadun via swift-evolution >> <[email protected]> wrote: >> >> Is there a technical reason that Swift cannot be expanded to allow arbitrary >> mixes of conditional binding and boolean assertions within a single compound >> guard statement? > > No. You already can, we just have the somewhat strange rule that to separate > `guard` conditions uses `,` before optional or pattern conditions, but > `where` before boolean conditions: > > guard x == 0, > let y = optional where > z == 2 { > } > > There's no technical reason we couldn't accept either 'where' or ',' > consistently. > > -Joe
Is it worth a proposal to allow both, for when the where clauses don't have to be semantically tied to the conditional binding? -- E /ccing in Mike Ash so he can gloat _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
