> Le 15 juin 2016 à 17:23, Jean-Daniel Dupas via swift-evolution 
> <[email protected]> a écrit :
> 
> 
>> Le 13 juin 2016 à 17:26, Erica Sadun via swift-evolution 
>> <[email protected]> a écrit :
>> 
>> 
>>> On Jun 13, 2016, at 9:23 AM, let var go via swift-evolution 
>>> <[email protected]> wrote:
>>> 
>>> I am 100% with Charlie on this. Expressiveness has to do with the 
>>> *effectiveness* of conveying a thought or a feeling.
>>> 
>>> Keep "where". It is expressive. It conveys a specific idea effectively and 
>>> concisely.
>> 
>> For those of you in favor of retaining `where`, how do you feel about adding 
>> `while`, `until`, `unless`, etc?
>> 
>> — E
> 
> What I like is the possibility to iterate over a filtered list using a 
> ‘single’ statement, not the keyword itself. If you propose to replace where 
> by something less confusing, or add other keywords, I’m all for it.
> 

For the folks who like the 'where' and do not like the 'guard .. else 
continue', (also considering in the equation the suggestion of renaming 'where' 
by 'if'). One can get the 'where' syntax without the 'where'  at the cost of 
one indentation level and the set of curly braces.

for element in dataArray {
  if condition {
    doWork()
  }
}

versus

for element in dataArray where condition {
  doWork()
}

Dany, slowly shifting into the "what's the point of keeping 'where'" camp
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to