> I’m not sure what you mean about introducing type unsafely.
What I mean is that once you do this:
let x: AnyCollection<Character> = myArrayOfCharacters
let y: AnyCollection<Character> = myString.characters
Both `x` and `y` have indices of type `Any<Comparable>`, and will now accept
each others' indices:
for i in x.indices {
print(y[i]) // Oops!
}
If this rule:
> The generalized existentials proposal goes out of its way to be explicit
> about the fact that only type safe operations would be visible through the
> existential.
Is trying to say that this isn't the case because APIs using the collection's
`Index` are not exposed on an `AnyCollection`, well, then I'm not sure what
`AnyCollection` is actually supposed to be used for.
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution