[swift-evolution] [Pitch] Add an all algorithm to Sequence

David Waite david at alkaline-solutions.com
Wed Apr 5 17:35:12 CDT 2017


Even with a closure, at the point of use it would likely be clear that the value is being used as a boolean condition - vs “filter” which returns an array.

-DW

> On Apr 5, 2017, at 4:06 PM, Jarod Long via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I don't think an argument label is sufficient to satisfy the first fundamental API design guideline: "Clarity at the point of use is your most important goal."
> 
> The argument label is not visible at the point of use when using trailing closure syntax, so it provides no additional clarity there. Moving the argument label into the base method name solves that problem and I think is a clear case of satisfying the second fundamental guideline: "Clarity is more important than brevity."
> 
> Jarod

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170405/d1855f2b/attachment.html>


More information about the swift-evolution mailing list