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

Dave Abrahams dabrahams at apple.com
Sat Jul 2 09:23:59 CDT 2016


On Jul 1, 2016, at 9:18 PM, Patrick Pijnappel <patrickpijnappel at gmail.com> wrote:

>> > 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?
>> https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684
>> https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750
> 
> This should probably all go through one generic String.init(_:radix:) method, and we probably also want to have a generic Integer.init?(_:radix:) initializer. I could submit a PR for those – I actually already have a prototype implementation for the latter. Should these changes be included in this SE proposal?

Sounds like it to me

>> On Sat, Jul 2, 2016 at 10:08 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> on Wed Jun 29 2016, Brent Royal-Gordon <swift-evolution at swift.org> wrote:
>> 
>> > 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?
>> 
>> https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684
>> https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750
>> 
>> --
>> Dave
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution


Sent from my moss-covered three-handled family gradunza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160702/b5c13f58/attachment.html>


More information about the swift-evolution mailing list