New Issue: Design: domain.isSubset(), domain.isSuper()

17907, "vasslitvinov", "Design: domain.isSubset(), domain.isSuper()", "2021-06-11T00:14:20Z"

Background: these two methods compute the subset relationship between two domains, producing a compilation error for the cases when this operation is not supported or does not make sense.

Subset/containment, as well as intersection, operations on domains should be consistent with those on ranges, which are discussed in #17125.

Proposal 1: replace with an overload domain.contains(anotherDomain)

With this proposal, d1.isSubset(d2) will be written as d2.contains(d1); d1.isSuper(d2) will become d1.contains(d2), assuming these are semantically equivalent.

Motivation: we prefer to have fewer functions with wider coverage, rather than a larger number of more-specialized functions. Also, the name "contains" is nice and sleek, whereas isSubset/isSuperset look clunky.

Q: Are there cases where d1.isSubset(d2) is more efficient to compute than d2.contains(d1) ? If so, is that a good reason to keep isSubset/isSuperset ?