Avatar
For consistency, the name for this function would be `isSuperset(of:)`, and it would be equally interesting to have `isStrictSuperset(of:)`, `isSubset(of:)`, `isStrictSubset(of:)` and `isDisjoint(with:)`--all currently available for types that conform to `SetAlgebra`. というフィードバックがあって、さらに It’s a shame that Range can’t be made to conform to SetAlgebra as it lacks the required initializers. Is there anything that can be done about this? Actually, it makes me wonder whether those initializers should even be a part of SetAlgebra — why must something implementing SetAlgebra be able to be initialized as empty or from a finite sequence? という意見が。確かになんで↓等のイニシャライザを持ってるんだろう? SetAlgebra が集合のオペレーションを規定するものであれば、イニシャライザは余計な気が。 https://developer.apple.com/documentation/swift/setalgebra/2908139-init (edited)