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

Dave Abrahams dabrahams at apple.com
Mon Apr 25 17:10:49 CDT 2016


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)


-- 
Dave



More information about the swift-evolution mailing list