[swift-evolution] [swift-evolution-announce] [Review] SE-0067: Enhanced Floating Point Protocols
Brent Royal-Gordon
brent at architechies.com
Mon Apr 25 19:57:31 CDT 2016
>>>> First, something absent: I'm a little bit concerned by the act that
>>>> there's no means to convert between different concrete FloatingPoint
>>>> types. Something like the IntMax mechanism in Swift 2's IntegerType
>>>> might be useful, though there may be good reasons not to do that.
>>>
>>> There are concrete conversions between all built in float types.
>>> Those aren’t going away. Are you saying that you want init(_ value:
>>> Float) etc to be protocol requirements?
>>
>> IIUC, what's being suggested is
>>
>> init<T: FloatingPoint>(_ x: T)
>
>
> inits between different radices, while a feature we’d probably like to have eventually, are out of scope for this proposal.
>
> The proposal does have:
>
> init<Source: BinaryFloatingPoint>(_ value: Source)
You're right—I missed that. My mistake. Consider that objection withdrawn.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list