<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><div><br><br>Cheers,<div><br></div><div>Curt</div><div><br></div></div>On Feb 27, 2016, at 10:03 PM, Erica Sadun via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">I've updated the proposal to take this into account: <a href="https://gist.github.com/erica/03c398c06f6c47824429" class="">https://gist.github.com/erica/03c398c06f6c47824429</a></div><div class=""><br class=""></div><div class="">It makes two core recommendations:</div><div class=""><br class=""></div><div class=""><div class="">1. Adjust stride function semantics to expand from two to three functions, renaming them appropriately.</div><div class="">2. Break floating point strides away from Strideable to provide their own stride method implementations.</div></div></div></blockquote><br><div>I don't have a strong opinion on the proposal. These sorts of strides are rare in the problem domains I work in. I would like to nitpick the proposed documentation for the new stride(through:,by:). The revised proposal gives the new documentation as:</div><div><br></div><div><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 15px; border-left-width: 4px; border-left-style: solid; border-left-color: rgb(221, 221, 221);"><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;"><span style="background-color: rgba(255, 255, 255, 0);">A <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">Strideable through</code> sequence currently returns the sequence of values (<code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">self</code>, <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">self + stride</code>, <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">self + stride + stride</code>, ... <em style="box-sizing: border-box;">last</em>) where <em style="box-sizing: border-box;">last</em> is the last value in the progression <strong style="box-sizing: border-box;">greater than or equal to</strong> <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">end</code>. There is no guarantee that <code style="box-sizing: border-box; padding: 0.2em 0px; margin: 0px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;">end</code> is an element of the sequence.</span></p><div style="color: rgb(119, 119, 119); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"><br></div></blockquote></div><div><br></div><div>That should read “where <i>last</i> is the **first** value in the progression that is <b>greater than or equal</b> to end.“ As proposed, <i>last</i> would be the largest number representable in self’s type that is a multiple of stride greater than self. That’s not the intent.</div><div><br></div><div>Cheers, </div><div><br></div><div>Curt</div><div><br></div><div>-------------------------</div><div>Curt Clifton, PhD </div><div>Software Developer </div><div>The Omni Group </div><div><a href="http://www.curtclifton.net">www.curtclifton.net</a> </div></body></html>