Well, probably best to have another operator: 0..>(-10). We go from 0 to greater than -10.<br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 5, 2016 at 5:22 PM Erica Sadun 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 Apr 5, 2016, at 4:17 PM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
><br>
><br>
> on Tue Apr 05 2016, Erica Sadun <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
><br>
>> On Apr 5, 2016, at 1:54 PM, Dave Abrahams<br>
>> <<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>> wrote:<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>
>> The latter better reflects an author's actual intent. The former depends on<br>
>> implementation details, which can be hazy, especially, around the edge cases. It<br>
>> is quicker to read, understand, and verify that the latter is what is<br>
>> meant.<br>
><br>
> Except that there seems to be some confusion over what "to:" means, right?<br>
<br>
<br>
obviously (0..<-10).by(-2) would be best.<br>
<br>
-- E<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>