[swift-evolution] [Review] SE-0104: Protocol-oriented integers

Brent Royal-Gordon brent at architechies.com
Wed Jun 29 15:34:58 CDT 2016


>         https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md

Minor omission I noticed: `Integer` doesn't formally model the `init?(_: String, radix: Int)` initializer. If it did, we could provide an `init?(_: String)` initializer that called through to it. We might even be able to take the existing string-to-integer logic, which I believe is duplicated for each type through GYB, and share it in an extension so no Integer needs to write its own conversion. Is that something that should be added?

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list