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

Patrick Pijnappel patrickpijnappel at gmail.com
Fri Jul 1 23:18:28 CDT 2016


>
> > 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?

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160702/13cba95c/attachment.html>


More information about the swift-evolution mailing list