on Thu Jun 23 2016, Erica Sadun <erica-AT-ericasadun.com> wrote:

>> On Jun 23, 2016, at 12:39 AM, David Hart <[email protected]> wrote:
>>> -      for test in removeFirstTests.filter({ $0.numberToRemove == 1 }) {
>>> +      for test in removeFirstTests.filter(
>>> +        suchThat: { $0.numberToRemove == 1 }
>>> 
>>> The difference between `filter` and `forEach` is that `forEach` is 
>>> explicitly 
>>> procedural while `filter` is functional.  I do not like functional chainable
>>> calls being modified to use explicit external labels in this way. 
>>> 
>>> I'd prefer no label here.
>> 
>> Quick aside. Eric, if you prefer no label here, why did you not also
>> prefer no labels for contains and elementsEqual? They also have very
>> functional. But if we must have a label, I’d vote for `where`.
>
> contains and elementsEqual both return Booleans which are almost never 
> chained.

What does chaining have to do with the presence of argument labels?

-- 
-Dave
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to