Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThis sounds plausible. Still, it's frustrating if true. It seems like a mistake to me to include all those interface methods that imply the mutability of the implementing class. (Likewise, I think it would be a mistake to include methods implying the class should be _immutable_.) It would be nice if `ISet<T>` included only "read" members. I think the interface as-is is too opinionated, and now I _still_ don't really have a way to communicate simply that "this is a collection of unique items." (At least so far as F# interop is concerned.)
      singulars
    2. COLooks like not quite the majority: by my count, only five of the 11 proper members of `ISet<T>` require mutation. If you include inherited members from `ICollection<T>`, it becomes eight of 18. (And of these, at least `void Add(T item)` will probably be implemented explicitly.)
      singulars
    3. COI was thinking about writing a similar answer, but then I looked at the `ISet<T>` interface and found out that it has quite a few operations that can still be implemented (namely `SetEquals`, `IsSubsetOf`, `IsSupersetOf`, `Overlaps`, `IsProperSubsetOf`, `IsProperSupersetOf`), maybe it's fewer than `IDictionary`, but still quite a few... Another reasoning may be that there are no .NET methods that would take `ISet<T>`, so there is no application-driven reason for implementing it (I guess there may be some good use case for `IDictionary`).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload