This is a minor point which doesn't affect functionality at all, but does slightly affect the API documentation, and it confused me for a little while.
In BigInt/Comparable.swift, it's extension BigUInt: Comparable, but extension BigInt (with no conformances listed). Both extensions define < and ==, and in fact both types are Comparable. It took me a little while to figure out how.
Declaring BigUInt: Comparable is technically redundant. (It's a nice reminder, though, that this type is Comparable.) It would be less confusing if either both types were marked Comparable, or neither were. Thanks!
This is a minor point which doesn't affect functionality at all, but does slightly affect the API documentation, and it confused me for a little while.
In BigInt/Comparable.swift, it's
extension BigUInt: Comparable
, butextension BigInt
(with no conformances listed). Both extensions define<
and==
, and in fact both types are Comparable. It took me a little while to figure out how.(BigInt/BigUInt -> SignedInteger/UnsignedInteger -> BinaryInteger -> Strideable -> Comparable)
Declaring
BigUInt: Comparable
is technically redundant. (It's a nice reminder, though, that this type is Comparable.) It would be less confusing if either both types were markedComparable
, or neither were. Thanks!