[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution
Thorsten Seitz
tseitz42 at icloud.com
Thu Feb 11 12:49:23 CST 2016
"intersection should form a pair with „union“, both being a noun.
"unioning“ is a bad choice. AFAIK „union“ is only rarely used as verb, so its present participle just sounds … strange.
I’d like to repeat my suggestion:
mutating (verbs):
x.intersect(x)
x.add(x)
x.subtract(x)
nonmutating (nouns):
x.intersection(x)
x.union(x)
x.difference(x)
-Thorsten
> Am 11.02.2016 um 19:06 schrieb Joe Groff via swift-evolution <swift-evolution at swift.org>:
>
>
>> On Feb 11, 2016, at 8:52 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>>
>>
>> Hi All,
>>
>> The API guidelines working group took up the issue of the InPlace suffix
>> yesterday, and decided that it was not to be used anywhere in the
>> standard library. We are planning to apply the changes shown here
>> <https://gist.github.com/dabrahams/d872556291a3cb797bd5> to the API of
>> SetAlgebra (and consequently Set) to make it conform to the guidelines
>> under development.
>>
>> Comments welcome as usual,
>
> -/// - `x.intersect(x) == x`
> -/// - `x.intersect([]) == []`
> -/// - `x.union(x) == x`
> -/// - `x.union([]) == x`
> +/// - `x.intersection(with: x) == x`
> +/// - `x.intersection(with: []) == []`
> +/// - `x.unioning(with: x) == x`
> +/// - `x.unioning(with: []) == x`
>
> What's with the (with:)? That seems like a pretty needless word. Same with 'of:' and friends.
>
> -Joe
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list