<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 6, 2016, at 2:35 PM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class="">Yes, but you can with warnings and fixits.&nbsp;</div><div class=""><br class=""></div><div class="">* The compiler should issue a warning for any use of&nbsp;</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">(n..&lt;m).striding(by: v | v &lt; 0) | n, m, v : Integer</font></div><div class=""><br class=""></div><div class="">with a fixit of "replace &nbsp;<span style="font-family: Courier;" class="">(n..&lt;m)&nbsp;</span>with&nbsp;<span style="font-family: Courier;" class="">(n...m - 1)</span>" regardless of</div><div class="">whether n or m is known at compile time&nbsp;</div><div class=""><br class=""></div><div class="">* If v cannot be known at compile time, I think the compiler should</div><div class="">always prefer ... to ..&lt;.</div><div class=""><br class=""></div><div class="">* The compiler should not allow</div><div class=""><br class=""></div><div class=""><span style="font-family: Courier;" class="">(n..&lt;m).striding(by: v | v &lt; 0) | n, m, v: floating point types</span></div><div class=""><br class=""></div><div class="">where v is known at compile time to be a negative constant. There should&nbsp;</div><div class="">also be a runtime precondition that raises a fatal error should a negative&nbsp;</div><div class="">v be used with a half-open interval.</div><div class=""><br class=""></div><div class="">-- E</div></div></div></blockquote><br class=""></div><div>Following up to myself, this can easily be expanded to the other cases just</div><div>brought up by Xiaodi Wu</div><div><br class=""></div><div>-- E</div><div><br class=""></div><br class=""></body></html>