<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Just for the reference. There was a lengthy discussion here in the mailing list back when the proposal was introduced:<div class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170109/thread.html#30191" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170109/thread.html#30191</a></div><div class=""><br class=""></div><div class="">Max</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 31, 2017, at 5:15 PM, Daryle Walker via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Looking at Apple’s Swift (4) docs at their SDK site, shouldn’t there be an “Integer” protocol between Numeric and BinaryInteger? Without that, there’s no solution for Integer types that are either a non-binary radix or a non-radix system (besides being over-broad with Numeric).<br class=""><br class="">What would move there are: isSigned, quotientAndRemainder, signum, %, %=, /, and /=.<br class=""><br class="">Also, how is ~ supposed to work in a BinaryInteger that is not a FixedWidthInteger? Extend the high bits to infinity? Maybe that operator should move to the derived protocol.<br class=""><br class="">Oh, why can’t a non-binary Integer type be fixed-width? FixedWidthInteger should be renamed “FixedWidthBinaryInteger,” which derives from BinaryInteger and a new version of FixedWidthInteger. The new version peels off: max, min, addingReportingOverflow, dividedReportingOverflow, dividingFullWidth, multipliedFullWidth, multipliedReportingOverflow, remainderReportingOverflow, and subtractingReportingOverflow. There’s also a “digitWidth” type property, analogous to “bitWidth”.<br class=""><br class="">Sent from my iPad<br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></body></html>