Certainly, for integer literals and strides of -1.<br><br>I meant more generally that removal of stride(...) will eliminate the possibility of striding to but not through arbitrary half-open intervals (a, b], where a < b, by a negative increment, because there is no such thing as `a>..b` to express such an interval as a Swift range.<br><br>Of course, all such cases can be handled by adjusting the endpoint and using a closed range instead, but the same can be said for all half-open ranges.<br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 5, 2016 at 2:54 PM Dave Abrahams <<a href="mailto:dabrahams@apple.com">dabrahams@apple.com</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="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 <<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>
</blockquote></div>