SignedNumberType protocol


(Aaron Bohannon) #1

Why doesn't the SignedNumberType protocol include more operators? If a
type supports negation, subtraction, and 0, shouldn't we be able to assume
that it will support addition, as well?


(Chris Lattner) #2

Hi Aaron,

We expect to revise the integer protocols in Swift 3 along the same lines as the floating point ones. Stay tuned for a swift-evolution proposal soon.

-Chris

ยทยทยท

On Jun 16, 2016, at 9:36 AM, Aaron Bohannon via swift-users <swift-users@swift.org> wrote:

Why doesn't the SignedNumberType protocol include more operators? If a type supports negation, subtraction, and 0, shouldn't we be able to assume that it will support addition, as well?