>
> > 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@swift.org> wrote:

>
> on Wed Jun 29 2016, Brent Royal-Gordon <swift-evolution@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@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to