You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second version is defined using MutableCollection as the main protocol and RangeReplaceableCollection as the conditional conformance. It should be the other way around. Mechanically, either order works. But spiritually, the method fits the philosophy of RRC and the MC condition is just an opportunity for optimization. From a non-spiritual view, it also messes up the documentation. MC methods never disrupt existing collection indices, but RRC methods always do; so it'll be confusing if an index-invalidating method appears in the documentation for MC without cause.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 94b88b2bf327d37592f4ad93e4d67e87
Issue Description:
(This may be on the order of being a bug, at least spiritually.)
The issue is not on
RangeSet
itself, but the extension methods onCollection
and its refined protocols. This is at [CollectionExtensions.swift|https://github.com/apple/swift-se0270-range-set/blob/master/Sources/SE0270_RangeSet/CollectionExtensions.swift.] There are two versions of theremoveSubranges(_🙂
method, one onRangeReplacableCollection
, and one for types that conform both to that andMutableCollection
.The second version is defined using
MutableCollection
as the main protocol andRangeReplaceableCollection
as the conditional conformance. It should be the other way around. Mechanically, either order works. But spiritually, the method fits the philosophy ofRRC
and theMC
condition is just an opportunity for optimization. From a non-spiritual view, it also messes up the documentation.MC
methods never disrupt existing collection indices, butRRC
methods always do; so it'll be confusing if an index-invalidating method appears in the documentation forMC
without cause.The text was updated successfully, but these errors were encountered: