> On Jun 9, 2016, at 1:57 PM, Haravikk <swift-evolut...@haravikk.me> wrote:
> 
> I think the idea here is for a change from the first to the second of:
> 
>       for eachValue in theValues where eachValue.isOdd { … }
>       for eachValue where eachValue.isOdd in theValues { … }
> 
> I’m kind of split on this for a few reasons. The first is that it doesn’t 
> ready quite as well plain like this, however I find it looks a bit better 
> like:
> 
>       for (eachValue where eachValue.isOdd) in theValues { … }


for eachValue where eachValue.isOdd in theValues { ... }
for case .Some(let value) where value > 5 in theValues { ... }

vs

for eachValue in theValues where eachValue.isOdd {...}
for case .Some(let value) in theValues where value > 5 { ... }

It should be parseable without parens.


> Just to clarify that what we’re looking for in theValues is “eachValue where 
> eachValue.isOdd”, though I could probably learn to read it like this without 
> parenthesis. That said, parenthesis lines up nicely with assignment of tuples 
> like:
> 
>       for (eachKey, eachValue where eachValue > 5) in theKeyValuePairs { … }

for (eachKey, eachValue) where eachValue > 5 in theKeyValuePairs {... }

The where clause is distinct from the pattern

-- E


_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to