One comment to remove, and then one general question: in slicing, typically slicing an X[T] returns another X[T]. For example, a list slice returns a list, a tuple slice returns a tuple. Here, when an ImmutableList/Set is sliced, we return a tuple. I don't know whether this is the right thing to do. The current solution is probably the best performance-wise, but it is a bit unusual.
@rgabbard replied
re: slicing, I think the performance impact is probably too big to do anything else, and the type signature should hopefully alert the user to any clash of expectations (and if they aren't using mypy, it's their own fault :-P ). We could consider adding another method to produce ImmutableX-typed slices, though, for those willing to pay the performance penalty.
On #20, @ConstantineLignos noted
@rgabbard replied