[Pitch #2] Add `isIdentical` Methods for Quick Comparisons to Concrete Types

Can any non-mutating operation on a string change its "known ASCII" bit?
Do the same properties apply to other flags (we should review them comprehensively)?

Is there any safe API that produces different observable behavior with respect to any trailing padding bits (e.g., in the small string representation)? If so, should those bits be masked or not masked for the purposes of this operation?

Does anything change with respect to Substring?
(On that note, while this proposal includes the custom slice types for String and Array, is there reason to add this API for the slice types of Dictionary, Set, and ContiguousArray? If so, are there any custom considerations there?)

1 Like