> On Jun 8, 2016, at 10:17 PM, Sean Heber <[email protected]> wrote: > > > On Jun 8, 2016, at 10:51 PM, Erica Sadun via swift-evolution > <[email protected] <mailto:[email protected]>> wrote: >> I saw your post on that *after* I finished sending this. Moving `where` next >> to the pattern, like you'd find in `catch` and switch `case`, the code would >> look like this: >> >> for i where i % 2 == 0 in sequence { >> // do stuff >> } > > This is the best version yet - the placement of 'where' makes total sense and > I really like it there. >
I really like how it aligns with case statements better. BUT I think using guard is still better because there's still user confusion between "does this terminate" and "does this filter". Guard use is unambiguous. -- E
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
