> On Apr 22, 2016, at 11:26 AM, Xiaodi Wu <[email protected]> wrote: > > On Fri, Apr 22, 2016 at 9:56 AM, Stephen Canon <[email protected]> wrote: >> >> On Apr 22, 2016, at 10:54 AM, Xiaodi Wu <[email protected]> wrote: >> >> Naive question: is it necessary to make a trade-off here? Why not an >> associated type Exponent that's Int for Float, Double, and Float80, >> allowing for something else for bignums? >> >> >> It’s an added (fairly minor) complexity to the API surface that confers >> approximately zero benefit. > > Alternatively, could `exponent` could be of type Self, just as `significand` > is?
IEEE 754 allows this (“If logBFormat is a floating-point format, then the following operations are homogeneous), but IMO this makes the property more awkward to use in practice. – Steve _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
