<div style="white-space:pre-wrap">Yes, definitely. I missed that one but it is pretty great.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 16, 2016 at 1:33 PM Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
on Tue Feb 16 2016, Craig Cruden <ccruden-AT-novafore.com> wrote:<br>
<br>
> Richard’s suggestions is amount the better ones:<br>
><br>
> Of the symdiff ones I think I would lean towards:<br>
><br>
> let symmetricDifference = a.unionMinusIntersection(b) // (a ∪ b) \ (a ∩ b) == a △ b<br>
<br>
Yeah, you're right; those were great ideas.<br>
<br>
> It is descriptive enough for those not familiar with the name “symmetricDifference”.<br>
><br>
> The fact that he keeps mutable names completely separate is a plus.<br>
><br>
>> On 2016-02-17, at 2:16:24, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
>><br>
>><br>
>> on Tue Feb 16 2016, Xiaodi Wu <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a> <mailto:<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>>> wrote:<br>
>><br>
>>> Not that I like it, but<br>
>>> insertNonIntersectingRemoveIntersectingContentsOf(_:) would be the<br>
>>> stylistically consistent way to convey the right sense.<br>
>><br>
>> Did you see Ricardo Parada's suggestions? I thought some of those were<br>
>> better.<br>
>><br>
>>> On Tue, Feb 16, 2016 at 10:22 AM Dave Abrahams via swift-evolution <<br>
>>> <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
>>><br>
>>>><br>
>>>> on Mon Feb 15 2016, Brent Royal-Gordon <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
>>>><br>
>>>>> I think you've ended up with the right approach, and I understand the<br>
>>>> need to move on, but...<br>
>>>>><br>
>>>>>> /// Returns the set of elements contained in `self` or in `other`,<br>
>>>> but not in both `self` and `other`.<br>
>>>>>> /// EXISTING: exclusiveOr<br>
>>>>>> @warn_unused_result<br>
>>>>>> func invertingIntersection(other: Self) -> Self<br>
>>>>>><br>
>>>>>> /// Replaces `self` with a set containing all elements contained in<br>
>>>> either `self` or `other`, but not both.<br>
>>>>>> /// EXISTING: exclusiveOrInPlace<br>
>>>>>> mutating func invertIntersection(other: Self)<br>
>>>>><br>
>>>>> I'm not quite happy with these. I don't like that the mutating form of<br>
>>>>> `intersection` is `intersect`, but the mutating form of<br>
>>>>> `invertingIntersection` is `invertIntersection`—it seems like both<br>
>>>>> methods should change the "intersection" part.<br>
>>>>><br>
>>>>> Have you considered going the opposite direction and combining the verb<br>
>>>> "intersect" with the adjective "inverse"?<br>
>>>>><br>
>>>>> /// Returns the set of elements contained in `self` or in `other`,<br>
>>>> but not in both `self` and `other`.<br>
>>>>> /// EXISTING: exclusiveOr<br>
>>>>> @warn_unused_result<br>
>>>>> func inverseIntersection(other: Self) -> Self<br>
>>>>><br>
>>>>> /// Replaces `self` with a set containing all elements contained in<br>
>>>> either `self` or `other`, but not both.<br>
>>>>> /// EXISTING: exclusiveOrInPlace<br>
>>>>> mutating func inverseIntersect(other: Self)<br>
>>>>> // or perhaps even `inverselyIntersect` so it's an adverb<br>
>>>>><br>
>>>>> I wouldn't be surprised if you did, because I could see you trying to<br>
>>>>> dodge the adverb problem, but I thought it was worth asking.<br>
>>>><br>
>>>> These names all have the wrong sense, including the ones that were<br>
>>>> decided upon. “Inverting the intersection” doesn't imply that elements<br>
>>>> not in the intersection will be merged, which is what happens in a<br>
>>>> symmetric difference.<br>
>>>><br>
>>>> --<br>
>>>> -Dave<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> swift-evolution mailing list<br>
>>>> <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
>>>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
>>>><br>
>>> _______________________________________________<br>
>>> swift-evolution mailing list<br>
>>> <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
>>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
>><br>
>> --<br>
>> -Dave<br>
>><br>
>> _______________________________________________<br>
>> swift-evolution mailing list<br>
>> <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a> <mailto:<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>><br>
>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a> <<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a>><br>
<br>
--<br>
-Dave<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>