[swift-evolution] [swift-evolution-announce] [Review] SE-0067: Enhanced Floating Point Protocols

Stephen Canon scanon at apple.com
Mon Apr 25 17:35:54 CDT 2016


> On Apr 25, 2016, at 6:10 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> on Mon Apr 25 2016, Stephen Canon <swift-evolution at swift.org> wrote:
> 
>>> On Apr 23, 2016, at 8:53 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> A few things…
>>> 
>>> 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)

– Steve


More information about the swift-evolution mailing list