<div dir="ltr">Just thinking out loud here:<div><br></div><div>"x's intersection with y" makes sense. So "x.intersection(with: y)" makes sense. That's already in Dave's diff.</div><div><br></div><div>Unfortunately the same doesn't work well for "x's union with y" — should "x.union(with: y)" be a mutating or nonmutating operation? Hard to tell.</div><div><br></div><div>How about we just move to ∪ and ∪= operators and call it a day? :-)</div><div><div><div class="gmail_extra">
<br><div class="gmail_quote">On Thu, Feb 11, 2016 at 11:36 AM, Erica Sadun <span dir="ltr"><<a href="mailto:erica@ericasadun.com" target="_blank">erica@ericasadun.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Assuming one would want to avoid the -ed suffix (and also -ing), one might consider:</div><div><br></div><div>* intersectionOf(), orOf(), unionOf() (or "With" over "Of")</div><div>* setIntersection(), setOr(), setUnion(),</div><div>* intersectionResult(), orResult(), unionResult(),</div><div>etc</div><span class=""><font color="#888888"><div><br></div><div>-- E</div></font></span><div><div class="h5"><div><br></div><br><div><blockquote type="cite"><div>On Feb 11, 2016, at 12:28 PM, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" target="_blank">jtbandes@gmail.com</a>> wrote:</div><br><div><div dir="ltr">"intersected" sounds okay to me. "unioned" is borderline, and "ored" is not something I'd want in the standard library. Neither is "oring".<div class="gmail_extra">
<br><div class="gmail_quote">On Thu, Feb 11, 2016 at 11:25 AM, Erica Sadun <span dir="ltr"><<a href="mailto:erica@ericasadun.com" target="_blank">erica@ericasadun.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I see the -ed versions as short for -edSet, with the Set being implied. Under this reasoning, unioned == unionedSet, intersected == intersectedSet, thus acting as nouns not verbs, and used for non-mutating application.</div><div><br></div><div>inPlace is only for mutating application. I mildly prefer the shorter union to unionInPlace, although I could argue both sides. (The latter is clearer but longer, the former is the short verb action that the whole guideline thing is supposed to endorse.)</div><span><font color="#888888"><div><br></div><div>-- E</div></font></span><div><div><div><br></div><div><blockquote type="cite"><div>On Feb 11, 2016, at 12:19 PM, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" target="_blank">jtbandes@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 11, 2016 at 11:09 AM, Erica Sadun via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><b>Non-Mutating, returning new value</b>: unioned(with), intersected(with), exclusiveOred(with)</div><div><br></div><div>Reasoning:</div><div><br></div><div>* <b>I think the -ing endings sound unnatural, stilted, and unmathematical. </b>They make me wince.</div></div></blockquote><div><br></div><div>So do the -ed versions, IMO. That's why -InPlace is such a convenient suffix.</div><div><br></div><div>Jacob</div></div></div></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></div>