[swift-evolution] [Review] SE-0099: Restructuring Condition Clauses

Xiaodi Wu xiaodi.wu at gmail.com
Sat May 28 15:06:17 CDT 2016


I'm just gotta quote from Advanced Swift:

Note that the where clause [in a for loop] does not work like the where
clause in a while loop. In a while loop, iteration stops once the value is
false, whereas in a for
loop, it functions like filter.

On Sat, May 28, 2016 at 16:00 Haravikk <swift-evolution at haravikk.me> wrote:

>
> > On 28 May 2016, at 20:21, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> >
> > There's already an inconsistency in where clause behavior for `if` and
> `while` versus `for` loops. It's nice IMO that the former uses are
> eliminated in this proposal.
>
> Can you give an example? That sounds like something that should be
> addressed separately rather than just dropping it.
> Like I say I really like using it for basic bind + condition cases, so I’m
> very much opposed to just tossing where clauses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160528/69eb6d88/attachment.html>


More information about the swift-evolution mailing list