SE-0494: Add `isIdentical(to:)` Methods for Quick Comparisons to Concrete Types

We already have the axiom that a copy is a representation that is identical. But I do not believe we need the axiom that a representation that is identical is a copy. A "copy" seems to be a much stronger guarantee than we need for library maintainers to ship isIdentical(to:) as an impactful API:

If there does exist legit documentation in Standard Library or evolution where we formally define that identical representations are also copies then please show me where to find that. I searched around everywhere I could think of and the only clues I could find implied the other direction: that copies are identical.

Anyway… the point of this was that I would see nothing wrong with a library maintainer choosing to implement isIdentical(to:) in a way that does not always compare as "same bitwise representation". As long as that library maintainer can adopt and satisfy the semantic guarantees then they should be free to have that extra flexibility here.

1 Like