<div style="white-space:pre-wrap">Ha, yes, clearly.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 5, 2016 at 4:00 PM Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
on Tue Apr 05 2016, Xiaodi Wu <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
<br>
> Certainly, for integer literals and strides of -1.<br>
><br>
> I meant more generally that removal of stride(...) will eliminate the<br>
> possibility of striding to but not through arbitrary half-open intervals (a, b],<br>
> where a < b, by a negative increment, because there is no such thing as `a>..b`<br>
> to express such an interval as a Swift range.<br>
<br>
That would clearly be<br>
<br>
a<..b<br>
<br>
if it was needed, neh?<br>
<br>
><br>
> Of course, all such cases can be handled by adjusting the endpoint and using a<br>
> closed range instead, but the same can be said for all half-open ranges.<br>
><br>
> On Tue, Apr 5, 2016 at 2:54 PM Dave Abrahams<br>
> <<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>> wrote:<br>
><br>
> on Tue Apr 05 2016, Xiaodi Wu <<a href="http://xiaodi.wu-AT-gmail.com" rel="noreferrer" target="_blank">xiaodi.wu-AT-gmail.com</a>> wrote:<br>
><br>
> > On Mon, Apr 4, 2016 at 1:22 PM, Dave Abrahams<br>
> <<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>> wrote:<br>
> >><br>
> >> on Sat Apr 02 2016, Xiaodi Wu <<a href="http://xiaodi.wu-AT-gmail.com" rel="noreferrer" target="_blank">xiaodi.wu-AT-gmail.com</a>> wrote:<br>
> >><br>
> >>> [snip]<br>
> >>><br>
> >>> Not included:<br>
> >>> 1. I know Ranges are in flux, so I've held off on extending Range with<br>
> >>> a striding(by:) method in this proof-of-concept.<br>
> >><br>
> >> They're not in flux, except for not having been reviewed yet; they are<br>
> >> settled in the swift-3-indexing-model branch.<br>
> ><br>
> > Did not know that. Will have to study what's there in more detail.<br>
> ><br>
> >>> 2. No attempt at the suggested stride(from:to:steps:) quite yet.<br>
> >><br>
> >> #1 and #2 are mutually exclusive; we prefer #1 as it removes questions<br>
> >> about the meaning of "to" or "through."<br>
> ><br>
> > I wasn't aware that was the thinking. Limiting strides to<br>
> > `striding(by:)` removes the ability to express `stride(from: 0, to:<br>
> > -10, by: -1)`<br>
><br>
> IMO this:<br>
><br>
> (-9...0).reverse()<br>
><br>
> is better than<br>
><br>
> stride(from: 0, to: -10, by: -1)<br>
><br>
> What do you think?<br>
><br>
> --<br>
> Dave<br>
><br>
> _______________________________________________<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/mailman/listinfo/swift-evolution</a><br>
<br>
--<br>
Dave<br>
<br>
_______________________________________________<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/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>