[swift-evolution] [Discussion] Terms of Art Swiftification
pgwsmith at gmail.com
Mon Jun 27 21:53:15 CDT 2016
I liked Brent Royal-Gordon’s suggestion of `every(where:)`. Select is too abstract and SQLish, whereas ‘every’ is a basic english word that would look familiar in a Swift Playground.
Or `where(_:)` I could live with.
> On 28 Jun 2016, at 5:31 AM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
> Under consideration is the resolution that "some terms of art while appropriate to many FP languages, may be better served by using Swift names."
> Consider, for example, `filter(_:)`. Sean Heber writes,
>> Just tossing my vote in the hat for renaming .filter() to something like .select() since that better matches what it does, IMO. “Filter” is almost like the opposite word from what it should be since the closure returning true is what decides what is included in the results, not what is filtered *from* the results. I mean, yeah, I can kind of understand the logic either way, but it’s always been one of those strange mental gymnastics things."
> When asked "Shouldn't there be a term of art exemption for `filter(_:)`. Otherwise why not use `select(where:)`," Dave Abrahams replies:
>> Because `where(...)` is better.
> Have at it.
> -- E
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution