Am 25.03.2016 um 13:44 schrieb Brent Royal-Gordon via swift-evolution 
<swift-evolution@swift.org>:

>>>    let foo = myArray
>>>        .filter { $0 & 1 == 1 }
>>>        .map { $0 + 1 }
>>>        .reduce(0) { $0 + $1 }
>> 
>> This doesn’t really seem much neater or more readable to me than:
>> 
>>    let foo = myArray
>>        .filter({ $0 & 1 == 1 })
>>        .map({ $0 + 1 })
>>        .reduce(0, { $0 + $1 })
> 
> I, on the other hand, cannot imagine how you would not see a difference 
> between the two. The paren-less form is *far* more readable to me; when you 
> put a parenthesis and a curly bracket next to each other, the curly bracket 
> disappears and I can no longer see that the expression is a closure.

Same for me!
 

> Swift generally doesn't mandate any particular style. I think this is a good 
> time to continue that tradition.

Indeed.

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

Reply via email to