Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-12-04 Thread Douglas Gregor via swift-evolution
> On Nov 29, 2017, at 9:21 AM, Wallacy via swift-evolution > wrote: > > Distances, yes... Count, not necessarily. It doesn’t really help you to have an extra bit of range for “count" that can’t be expressed in the distance, i.e., where c.count returns a value but

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-30 Thread Xiaodi Wu via swift-evolution
On Wed, Nov 29, 2017 at 10:46 AM, Ben Cohen wrote: > You can argue the current status is a bug, but… > > Welcome to Apple Swift version 4.0.1 (swiftlang-900.0.67 clang-900.0.38). > Type :help for assistance. > 1> CountableRange.IndexDistance.self > $R0: Int.Type = Int >

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-29 Thread Wallacy via swift-evolution
Distances, yes... *Count*, not necessarily. Em qua, 29 de nov de 2017 às 15:17, Xiaodi Wu escreveu: > Distance must be signed, so it cannot be UInt. > On Wed, Nov 29, 2017 at 11:14 Wallacy wrote: > >> I think is that's why some folks ask for count be

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-29 Thread Xiaodi Wu via swift-evolution
Distance must be signed, so it cannot be UInt. On Wed, Nov 29, 2017 at 11:14 Wallacy wrote: > I think is that's why some folks ask for count be UInt (or UInt64 when > appropriate) some time ago. > > I dont know how solve this, but appear to be less painful than current >

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-29 Thread Wallacy via swift-evolution
I think is that's why some folks ask for count be UInt (or UInt64 when appropriate) some time ago. I dont know how solve this, but appear to be less painful than current IndexDistance. Em qua, 29 de nov de 2017 às 14:46, Ben Cohen via swift-evolution < swift-evolution@swift.org> escreveu: > You

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-29 Thread Ben Cohen via swift-evolution
You can argue the current status is a bug, but… Welcome to Apple Swift version 4.0.1 (swiftlang-900.0.67 clang-900.0.38). Type :help for assistance. 1> CountableRange.IndexDistance.self $R0: Int.Type = Int 2> (Int64.min..

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-29 Thread Xiaodi Wu via swift-evolution
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.. wrote: > My suggestion would be: don’t have your Collection-like type conform to > Collection. Give it collection-like methods if you want

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-28 Thread Karl Wagner via swift-evolution
> On 28. Nov 2017, at 02:34, Douglas Gregor via swift-evolution > wrote: > > Hello Swift community, > > The review of SE-0191 "Eliminate IndexDistance from Collection" begins now > and runs through December 3, 2017. The proposal is available here: > >

[swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-28 Thread Brad Hilton via swift-evolution
+1. Feels more Swifty to keep things simple when additional complexity isn’t warrented. > Hello Swift community, > > > The review of SE-0191 "Eliminate IndexDistance from Collection" begins now > and runs through December 3, 2017. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-28 Thread Tony Allevato via swift-evolution
On Mon, Nov 27, 2017 at 5:34 PM Douglas Gregor via swift-evolution < swift-evolution@swift.org> wrote: > Hello Swift community, > > The review of SE-0191 "Eliminate IndexDistance from Collection" begins now > and runs through December 3, 2017. The proposal is available here: > > >

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-28 Thread Daniel Vollmer via swift-evolution
Hi list, > On 28. Nov 2017, at 02:34, Douglas Gregor via swift-evolution > wrote: > > The review of SE-0191 "Eliminate IndexDistance from Collection" begins now > and runs through December 3, 2017. The proposal is available here: > > • What is your evaluation

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-27 Thread Douglas Gregor via swift-evolution
> On Nov 27, 2017, at 5:58 PM, Guillaume Lessard via swift-evolution > wrote: > > > >> On Nov 27, 2017, at 18:34, Douglas Gregor via swift-evolution >> wrote: >> >> Hello Swift community, >> >> The review of SE-0191 "Eliminate

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-27 Thread Ben Cohen via swift-evolution
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. In practice, these “huge” collections will be mostly used

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-27 Thread Nevin Brackett-Rozinsky via swift-evolution
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. Is there a recommended migration strategy for this scenario? Nevin On Mon, Nov 27, 2017 at 8:34 PM, Douglas Gregor via

Re: [swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-27 Thread Guillaume Lessard via swift-evolution
> On Nov 27, 2017, at 18:34, Douglas Gregor via swift-evolution > wrote: > > Hello Swift community, > > The review of SE-0191 "Eliminate IndexDistance from Collection" begins now > and runs through December 3, 2017. [snip] > • What is your evaluation of the

[swift-evolution] [Review] SE-0191: Eliminate IndexDistance from Collection

2017-11-27 Thread Douglas Gregor via swift-evolution
Hello Swift community, The review of SE-0191 "Eliminate IndexDistance from Collection" begins now and runs through December 3, 2017. The proposal is available here: https://github.com/apple/swift-evolution/blob/master/proposals/0191-eliminate-indexdistance.md Reviews are an important part of