<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi all,</div><div class=""><br class=""></div><div class="">I can’t make up my mind. Let me propose two different alternatives that I’m not sure if they have been considered:</div><div class=""><br class=""></div><div class=""><div class=""><div class=""><b class="">ALTERNATIVE 1</b></div><div class=""><br class=""></div><div class=""><b class="">Non-mutable (noun-based)</b></div><div class=""><br class=""></div><div class=""><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func union(other: Self) -> Self</span></div><div class=""></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func union(other: Self) -> Self<span class="Apple-tab-span">                </span></span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">Assumes union is a noun, i.e. not a verb</span></div><div class=""><font color="#bd2c00" face="Consolas, Liberation Mono, Menlo, Courier, monospace" class=""><span style="font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class=""><br class=""></span></font><table class="js-file-line-container highlight tab-size" data-tab-size="8" style="box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; tab-size: 8; color: rgb(51, 51, 51); font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 13px;"><tbody style="box-sizing: border-box;" class=""></tbody></table><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func intersect(other: Self) -> Self</span></div></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func intersection(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func subtract(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func subtraction(other: Self) -> Self</span></div><div class=""><br class=""></div><div class=""><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func exclusiveOr(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func symmetricSubtraction(other: Self) -> Self</span></div><div class=""><br class=""></div></div><div class="">M<b class="">utable (verb-based)</b></div><div class=""><br class=""></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func unionInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func unite(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func intersectInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func intersect(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func subtractInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func subtract(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div></div></div><div class=""><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func exclusiveOrInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func symmetricSubtract(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div></div><div class=""><b class=""><br class=""></b></div><div class=""><b class="">Comments:</b> </div><div class=""><br class=""></div><div class="">With this alternative we keep the union name which I assume is popular. However, one has to accept unite as a verb (for the mutable version) as I wanted all the mutable methods use verbs for consistency. I think unite is acceptable because it can be found in the dictionary and<i class=""> it is a verb</i>. </div><div class=""><br class=""></div><div class="">Notice that all the non-mutable methods use nouns: union, intersection, subtraction and symmetricSubtraction. </div><div class=""><br class=""></div><div class="">I understand some may oppose to symmetricSubtraction saying that symmetricSubraction is not as common as "exclusive or". However, using symmetricSubtraction is consistent with subtraction and it hints to a variation of the “subtraction" operation. We will get used to it quickly / easily.</div><div class=""><br class=""></div><div class="">The mutable methods all use verbs: unite, intersect, subtract and symmetricSubtract.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">ALTERNATIVE 2</b></div><div class=""><div class=""><br class=""></div><div class=""><b class="">Non-mutable</b></div><div class=""><b class=""><br class=""></b></div><div class=""><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func union(other: Self) -> Self</span></div><div class=""></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func adding(other: Self) -> Self</span></div><div class=""><font color="#bd2c00" face="Consolas, Liberation Mono, Menlo, Courier, monospace" class=""><span style="font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class=""><br class=""></span></font><table class="js-file-line-container highlight tab-size" data-tab-size="8" style="box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; tab-size: 8; color: rgb(51, 51, 51); font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 13px;"><tbody style="box-sizing: border-box;" class=""></tbody></table><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func intersect(other: Self) -> Self</span></div></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func intersecting(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func exclusiveOr(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func exclusiveOring(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- func subtract(other: Self) -> Self</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ func removing(other: Self) -> Self</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">M<b class="">utable</b></div><div class=""><br class=""></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func unionInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func add(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func intersectInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func intersect(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func exclusiveOrInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func exclusiveOr(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><span style="color: rgb(189, 44, 0); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(255, 236, 236);" class="">- mutating func subtractInPlace(other: Self)</span></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class="">+ mutating func remove(other: Self)</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Comments:</b> This alternative gives up on union in favor or add. Many may not like this, that is why I have it as the second alternative. It brings back exclusiveOr and treats it as a verb. Some may argue that exclusiveOr is a noun for the "exclusive or" operation.</div><div class=""><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="color: rgb(85, 165, 50); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; white-space: pre; background-color: rgb(234, 255, 234);" class=""><br class=""></span></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 11, 2016, at 11:52 AM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">Hi All,<br class=""><br class="">The API guidelines working group took up the issue of the InPlace suffix<br class="">yesterday, and decided that it was not to be used anywhere in the<br class="">standard library. We are planning to apply the changes shown here<br class=""><<a href="https://gist.github.com/dabrahams/d872556291a3cb797bd5" class="">https://gist.github.com/dabrahams/d872556291a3cb797bd5</a>> to the API of<br class="">SetAlgebra (and consequently Set) to make it conform to the guidelines<br class="">under development.<br class=""><br class="">Comments welcome as usual,<br class=""><br class="">-- <br class="">-Dave<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>