[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution

Matthew Judge matthew.judge at gmail.com
Fri Feb 12 07:23:31 CST 2016


On Thu, Feb 11, 2016 at 4:27 PM, Rob Mayoff via swift-evolution <
swift-evolution at swift.org> wrote:

> On Thu, Feb 11, 2016 at 12:54 PM, Jim Hillhouse via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> The present participle of 'union' is technically speaking, 'unioning'.
>> But it is not widely used. In fact, in both Pages and Word, 'unioning' is
>> flagged as a misspelling of 'union'.
>>
>
> Outside of programming, "union" is a noun, not a verb, and "unite" is
> already a perfectly good verb that means "create the union of".  So why not
>
>     func union(with other: Self) -> Self
>     func unite(with other: Self)
>
>
My biggest problem with this diff is the different treatment of "union" and
"intersection"... it is confusing that one is mutating and the other is
non-mutating. They are both the same part of speech and both the term of
art, so they should both have the same mutability implications.

I'd vote either of the following (leaning toward the first group because I
think the term of art implies non-mutating):

func union(other: Self) -> Self
func unite(other: Self)
func intersection(other: Self) -> Self
func intersect(other: Self)

func uniting(other: Self) -> Self
func union(other: Self)
func intersecting(other: Self) -> Self
func intersection(other: Self)

unite and uniting are still reasonably close to union (exactly the same for
the first 3 characters which should help with autocomplete discoverability).



>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160212/8836caf2/attachment.html>


More information about the swift-evolution mailing list