D'oh! Of course, that sounds great. Would it require you to do something else to cover your example with UnsafePointers though? On Mon, Mar 28, 2016 at 4:56 PM Dave Abrahams via swift-evolution < [email protected]> wrote:
> > on Mon Mar 28 2016, Erica Sadun <[email protected]> wrote: > > >> On Mar 28, 2016, at 3:25 PM, Dave Abrahams via swift-evolution > >> <[email protected]> wrote: > >> > >> > >> on Mon Mar 28 2016, Xiaodi Wu > > > >> <[email protected] > >> <mailto:[email protected]>> > >> wrote: > >> > >>> Right, Countable could refine Strideable. I'm no expert on this, but > >>> some cursory reading suggests that the analogous feature in C++ simply > >>> requires the type to have operator++ defined. Obviously, that won't > >>> work for Swift 3.0... > >> > >> Hmm, instead of defining a new protocol (Countable), what if we just use > >> “Strideable where Stride : Integer” as a constraint? > > > > I like a differentiation between continuous and discrete things > > although both can have ranges, membership, fences, > > and a way to stride through them > > Strideable where Stride : Integer expresses just exactly that. Now if I > could only get the type-checker to cooperate... > > > > > > > -- E, just musing, not passing judgement on names > > > > _______________________________________________ > > swift-evolution mailing list > > [email protected] > > https://lists.swift.org/mailman/listinfo/swift-evolution > > -- > Dave > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
