<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Jul 1, 2016, at 9:18 PM, Patrick Pijnappel <<a href="mailto:patrickpijnappel@gmail.com">patrickpijnappel@gmail.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="im" style="font-size:13px">> We might even be able to take the existing string-to-integer<br></span><span class="im" style="font-size:13px">> logic, which I believe is duplicated for each type through GYB, and<br></span><span class="im" style="font-size:13px">> share it in an extension so no Integer needs to write its own<br></span><span class="im" style="font-size:13px">> conversion. Is that something that should be added?</span><span class="im" style="font-size:13px"><br></span><a href="https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684" rel="noreferrer" target="_blank" style="font-size:13px">https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684<br></a><a href="https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750" rel="noreferrer" target="_blank" style="font-size:13px">https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750</a></blockquote><div><br></div><div>This should probably all go through one generic <font face="monospace, monospace">String.init(_:radix:)</font> method, and we probably also want to have a generic <font face="monospace, monospace">Integer.init?(_:radix:)</font> 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?</div></div></div></blockquote><div><br></div>Sounds like it to me<div><br><blockquote type="cite"><div><div class="gmail_extra"><div class="gmail_quote">On Sat, Jul 2, 2016 at 10:08 AM, Dave Abrahams via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
on Wed Jun 29 2016, Brent Royal-Gordon <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
<br>
> We might even be able to take the existing string-to-integer<br>
> logic, which I believe is duplicated for each type through GYB, and<br>
> share it in an extension so no Integer needs to write its own<br>
> conversion. Is that something that should be added?<br>
<br>
</span><a href="https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L684</a><br>
<a href="https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/test/Prototypes/Integers.swift.gyb#L750</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Dave<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></div></blockquote></div></div>
</div></blockquote><br></div><div><br></div><div><span style="background-color: rgba(255, 255, 255, 0);">Sent from my moss-covered three-handled family gradunza</span></div></body></html>