[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution
Xiaodi Wu
xiaodi.wu at gmail.com
Thu Feb 11 17:33:52 CST 2016
On Thu, Feb 11, 2016 at 5:24 PM, Brent Royal-Gordon via
swift-evolution <swift-evolution at swift.org> wrote:
> My suggestions:
>
> union -> union
> intersect -> intersection
> subtract -> subtraction
>
> unionInPlace -> unite
> intersectInPlace -> intersect
> subtractInPlace -> subtract
>
> In other words, treat the mutating forms as imperative verbs and the nonmutating forms as nouns. This basically makes the nonmutating forms into accessors, which I think is a good alternative given the trouble we're having with -ing/-ed.
I could live with that.
> That still leaves exclusiveOr, which is frankly a horrible name to begin with. I think we have to derive a name from the "symmetric difference" terminology, giving us
>
> exclusiveOr -> difference
> exclusiveOrInPlace -> differ
Nit: the set difference, or just difference, of two sets is the term
for the result of subtraction() and isn't the same as the symmetric
difference.
More information about the swift-evolution
mailing list