<div dir="ltr">On Wed, Nov 29, 2017 at 10:46 AM, Ben Cohen <span dir="ltr">&lt;<a href="mailto:ben_cohen@apple.com" target="_blank">ben_cohen@apple.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">You can argue the current status is a bug, but…<div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.952941)"><span style="font-variant-ligatures:no-common-ligatures">Welcome to Apple Swift version 4.0.1 (swiftlang-900.0.67 clang-900.0.38). Type :help for assistance.</span></div><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.952941)"><span style="font-variant-ligatures:no-common-ligatures;color:rgba(116,116,116,0.97)">  1&gt; </span><span style="font-variant-ligatures:no-common-ligatures">CountableRange&lt;Int64&gt;.<wbr>IndexDistance.self</span></div><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(52,187,200);background-color:rgba(0,0,0,0.952941)"><span style="font-variant-ligatures:no-common-ligatures">$R0: Int.Type = Int</span></div><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.952941)"><span style="font-variant-ligatures:no-common-ligatures;color:rgba(116,116,116,0.97)">  2&gt; </span><span style="font-variant-ligatures:no-common-ligatures">(Int64.min..&lt;Int64.max).count</span></div><div style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.952941)"><span style="font-variant-ligatures:no-common-ligatures;color:#c33720">Execution interrupted. </span><span style="font-variant-ligatures:no-common-ligatures">Enter code to recover and continue.</span></div><div><div class="h5"><div><br></div></div></div></div></div></blockquote><div><br></div><div>I do believe that, in the source code, this is marked with a &quot;FIXME(ABI)&quot; comment.</div><div><br></div><div>(I dearly wish that we could have a primitive `Int1` available on which to base a type such as `Int65` in the same manner as we implement `DoubleWidth`. It would solve this use case beautifully.)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div class="h5"><div><blockquote type="cite"><div>On Nov 29, 2017, at 4:04 AM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="m_-3435852300927004767Apple-interchange-newline"><div><div dir="auto">So that we are all clear on the implications of this, if IndexDistance becomes Int, ranges of integers will stop conforming to Collection, because Int.min..&lt;Int.max has Int.max * 2 elements, and Int64.min..&lt;Int64.max has potentially many more.</div><div dir="auto"><br></div><div dir="auto">This would entail nontrivial source breakage.</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div>On Mon, Nov 27, 2017 at 22:02 Ben Cohen via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">My suggestion would be: don’t have your Collection-like type conform to Collection. Give it collection-like methods if you want them, like an indexing and slicing subscript that takes an Int64. It can still conform to Sequence.<div><br></div><div>In practice, these “huge” collections will be mostly used concretely, so their Collection conformance doesn’t buy you much. The reality is that very few generic uses on these types will succeed. You get a few things like .first, .last etc. for free. But very few algorithms are written to handle &gt; Int.max lengths (several in the std lib don’t) – it just isn’t practical. And meanwhile, this is a huge burden on many other use cases.</div><div><br></div><div>The existence of the memory mapped file case is hypothetical. I canvassed a bit on twitter for some use cases. The only one I got back was where someone was using IndexDistance to stash other information: but this isn’t really a legal use of IndexDistance, since it must be numerically castable to other integer types when needed which would be a lossy operation so at best, it would just be an optimization.</div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><br><blockquote type="cite"><div>On Nov 27, 2017, at 19:29, Nevin Brackett-Rozinsky via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-3435852300927004767m_-8655857168457909723Apple-interchange-newline"><div><div>The proposal mentions one reasonable situation where a larger-than-Int type would be useful, namely a Collection wrapping a memory-mapped file, being used on 32-bit systems.<div><br></div><div>Is there a recommended migration strategy for this scenario?</div><div><br></div><div>Nevin</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 8:34 PM, Douglas Gregor via swift-evolution <span>&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">Hello Swift community,</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">The review of SE-0191 &quot;Eliminate IndexDistance from Collection&quot; begins now and runs through December 3, 2017. The proposal is available here:</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);background-color:rgb(255,255,255)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px"><font color="#6a737d" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0191-eliminate-indexdistance.md" target="_blank">https://github.com/apple/<wbr>swift-evolution/blob/master/<wbr>proposals/0191-eliminate-<wbr>indexdistance.md</a></font></div></blockquote><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(106,115,125);border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="nofollow" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a></div></blockquote><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);background-color:rgb(255,255,255)"><p style="color:rgb(106,115,125);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;box-sizing:border-box;margin-top:0px;margin-bottom:16px">Proposal link:</p><blockquote style="box-sizing:border-box;margin:0px;padding:0px 1em;border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px"><font color="#6a737d" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0191-eliminate-indexdistance.md" target="_blank">https://github.com/apple/<wbr>swift-evolution/blob/master/<wbr>proposals/0191-eliminate-<wbr>indexdistance.md</a></font></div></blockquote></blockquote><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(106,115,125);border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px">Reply text</div></blockquote><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(106,115,125);border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)"><blockquote style="box-sizing:border-box;margin:0px;padding:0px 1em;border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px">Other replies</div></blockquote></blockquote><h5 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:0.875em;line-height:1.25;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;background-color:rgb(255,255,255)"><a href="https://github.com/apple/swift-evolution#what-goes-into-a-review-1" class="m_-3435852300927004767m_-8655857168457909723m_3304906467936138514anchor" id="m_-3435852300927004767m_-8655857168457909723m_3304906467936138514user-content-what-goes-into-a-review-1" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u></u><u></u><u></u><u></u></a>What goes into a review?</h5><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)"><li style="box-sizing:border-box">What is your evaluation of the proposal?</li><li style="box-sizing:border-box;margin-top:0.25em">Is the problem being addressed significant enough to warrant a change to Swift?</li><li style="box-sizing:border-box;margin-top:0.25em">Does this proposal fit well with the feel and direction of Swift?</li><li style="box-sizing:border-box;margin-top:0.25em">If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</li><li style="box-sizing:border-box;margin-top:0.25em">How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</li></ul><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">More information about the Swift evolution process is available at</p><blockquote style="box-sizing:border-box;margin:0px 0px 16px;padding:0px 1em;color:rgb(106,115,125);border-left-width:0.25em;border-left-style:solid;border-left-color:rgb(223,226,229);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)"><div style="box-sizing:border-box;margin-top:0px;margin-bottom:0px"><a href="https://github.com/apple/swift-evolution/blob/master/process.md" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">https://github.com/apple/<wbr>swift-evolution/blob/master/<wbr>process.md</a></div></blockquote><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">Thank you,</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">-Doug</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;;font-size:16px;background-color:rgb(255,255,255)">Review Manager</p></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div></div>
______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br></div></blockquote></div><br></div></div>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</blockquote></div></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>