<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 30, 2016 at 8:21 PM, Matthew Johnson via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5"><blockquote type="cite"><div>On Jun 30, 2016, at 8:12 PM, Dave Abrahams &lt;<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>&gt; wrote:</div><br><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">on Thu Jun 30 2016, Matthew Johnson &lt;</span><a href="http://matthew-at-anandabits.com/" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">matthew-AT-anandabits.com</a><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">&gt; wrote:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Sent from my iPad<br><br><blockquote type="cite">On Jun 30, 2016, at 6:59 PM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br><br><blockquote type="cite"><blockquote type="cite">On Jun 30, 2016, at 5:47 PM, James Berry &lt;<a href="mailto:jberry@rogueorbit.com" target="_blank">jberry@rogueorbit.com</a>&gt; wrote:<br><br><br>On Jun 30, 2016, at 4:05 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>on Thu Jun 30 2016, Erica Sadun &lt;<a href="http://erica-at-ericasadun.com" target="_blank">erica-AT-ericasadun.com</a>&gt; wrote:<br><br><blockquote type="cite"><blockquote type="cite">On Jun 30, 2016, at 4:41 PM, Dave Abrahams &lt;<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>&gt; wrote:<br><blockquote type="cite">I mentioned this in a comment on the gist already, but I&#39;m really not<br>digging the &quot;array&quot; in `arraySpacing`. We&#39;ve already moved from top-level<br>&quot;stride&quot; to &quot;memory layout spacing,&quot; gaining plenty of clarity. I&#39;m<br>skeptical that the &quot;array&quot; adds anything more. Moreover, it muddies the<br>waters by mentioning a specific type (Array) in a context where you&#39;re<br>querying the memory layout properties of another type.<br></blockquote><br>OK, I agree with that.  If we have “alignment” rather than<br>“defaultAlignment,” I suppose we can have plain “spacing.”<br></blockquote><br>No way to last-second sell you on interval rather than spacing?<br></blockquote><br>If you can explain why it&#39;s better.<br><br><blockquote type="cite">// Returns the least possible interval between distinct instances of<br>/// `T` in memory.  The result is always positive.<br></blockquote><br>For me, “interval” doesn&#39;t go with “size” and “alignment,” which are all<br>about physical distances and locations.  There are all kinds of<br>“intervals,” e.g. time intervals.<br></blockquote><br>Hmm. Sounds like stride to me. stride or byteStride?<br><br>James<br></blockquote><br>FAQ: &quot;Why aren&#39;t you using the obvious phrase `stride` for something that clearly<span> </span><br>returns the memory stride?&quot;<br><br>ANSWER: &quot;As stride already has a well-established meaning in the standard library,<br>this proposal changes the name to spacing, providing a simple but correct name that<br>works well enough in its intended use. Measuring memory is sufficiently esoteric<br>that we prefer to reserve `stride` for a more common use case.&quot;<br></blockquote><br>Counter: some words have more than one well established meaning when<br>used in different contexts.  &#39;spacing&#39; isn&#39;t too bad here (much better<br>than &#39;arraySpacing&#39;) but sticking to the term of art &#39;stride&#39; would be<br>best IMO.  As James mentioned, spacing implies empty space *between*<br>items whereas stride matches the meaning of this property *exactly*<br>(which is why it is the term of art).<br><br>If a programmer can&#39;t distinguish between a &#39;stride&#39; property on<br>MemoryLayout and the &#39;stride&#39; function they probably have no business<br>doing anything which requires use of MemoryLayout in the first place.<br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">I don&#39;t believe that “stride” *is* the accepted term of art for this</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">meaning.  I never heard of the idea of types having an intrinsic</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">“stride” until I arrived on the Swift project.  That usage came from</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">“strideof.”  </span></div></blockquote><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">If you all swear up and down that you&#39;ve been talking about “the stride</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">of a type” for more than 2 years, I won&#39;t fight you on this.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Otherwise... well, I still won&#39;t fight; I&#39;m being crushed by an</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">avalanche of bikesheds and I can&#39;t muster the energy ;-&gt;... but I&#39;ll</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">forever be plagued by doubts about the name.</span></div></blockquote><div><br></div></div></div><div>I was just throwing in my 2 cents and planned to leave it at that.  The primary reason I chimed in is because I didn’t find the rationale in the “answer” compelling.  This isn’t something I feel like bike shedding any further over either.  </div><div><br></div><div><div><a href="https://en.wikipedia.org/wiki/Stride_of_an_array" target="_blank">https://en.wikipedia.org/wiki/Stride_of_an_array</a>  </div><div><br></div><div>Maybe stride isn’t as common as I thought it was (if it was I’m sure you would have heard of it before Swift) but it certainly predates Swift in usage.</div></div></div></div></blockquote><div><br></div><div>This does make the case for stride more strongly. At this point I too could go either way.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br>-Matthew<span class="HOEnZb"><font color="#888888"><br><br><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">--<span> </span></span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Dave</span></div></blockquote></font></span></div><br></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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></blockquote></div><br></div></div>