[Issue 6718] "nWayUnion" => "nWayMerge", plus true nWayUnion

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 16 12:21:20 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=6718

--- Comment #9 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to RazvanN from comment #8)
> So, how should we proceed here? Rename nWayUnion to nWayMerge and alias
> nWayUnion to it? If we do that we should probably deprecate nWayUnion.

@RazvanN, let's do this:

* rename nWayUnion to multiwayMerge

* rename struct NWayUnion to MultiwayMerge

* leave nWayUnion as an undocumented alias of multiwayMerge. Mention in the
documentation that "...for backward compatibility, `multiwayMerge` is also
available under the name `nWayUnion`, which will be deprecated. New code should
use `multiwayMerge`." Coordinate with Sebastian and Vladimir about the exact
text and layout.

That would be one PR. The second PR:

* add function multiwayUnion that actually performs the union (no repeats). A
simple implementation is to pipe the result of multiwayMerge through uniq.

* add function multiwayIntersection that performs the intersection of multiple
sets.

These pull requests would close this issue.

--


More information about the Digitalmars-d-bugs mailing list