During the implementation of SE-104 in Swift 4, a handful of methods were added to
These were not part of the SE proposal – they were part of early prototypes, and ended up getting merged alongside the changes that were accepted.
These methods are easily confused with the overflow operators, except that they'll trap in debug. But they are very different: if they fail in release builds they produce undefined behavior. They might wrap, or crash, or produce garbled results, depending on what the compiler does with this instruction. This is very dangerous (despite having "unsafe" in the name) and is fairly out of keeping with the rest of the standard library, where this kind of unsafe undefined behavior is usually reserved for pointers and low level memory operations. But they do this while offering a tempting suggestion of safety: that they assert in debug builds on overflow (similar to how
UnsafeBufferPointer asserts on out-of-bounds access in debug builds). But in the case of arithmetic operations, it would probably be better written explicitly in user code, with a combination of an assert and either
&+, both of which have well-defined results in cases of overflow.
Since these methods were not introduced as part of an evolution proposal, the core team feels it's probably appropriate to deprecate/remove them (ideally before they make it into the ABI) without a further proposal. A search of GitHub suggests they are barely used (most hits are copies of the std lib). But I'm starting a thread in case anyone has views on their benefits we might be missing.