<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"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></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 <<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>> 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 <</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">> 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 <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br><br><br><blockquote type="cite"><blockquote type="cite">On Jun 30, 2016, at 5:47 PM, James Berry <<a href="mailto:jberry@rogueorbit.com" target="_blank">jberry@rogueorbit.com</a>> wrote:<br><br><br>On Jun 30, 2016, at 4:05 PM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>on Thu Jun 30 2016, Erica Sadun <<a href="http://erica-at-ericasadun.com" target="_blank">erica-AT-ericasadun.com</a>> wrote:<br><br><blockquote type="cite"><blockquote type="cite">On Jun 30, 2016, at 4:41 PM, Dave Abrahams <<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>> wrote:<br><blockquote type="cite">I mentioned this in a comment on the gist already, but I'm really not<br>digging the "array" in `arraySpacing`. We've already moved from top-level<br>"stride" to "memory layout spacing," gaining plenty of clarity. I'm<br>skeptical that the "array" adds anything more. Moreover, it muddies the<br>waters by mentioning a specific type (Array) in a context where you'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'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'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: "Why aren't you using the obvious phrase `stride` for something that clearly<span> </span><br>returns the memory stride?"<br><br>ANSWER: "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."<br></blockquote><br>Counter: some words have more than one well established meaning when<br>used in different contexts. 'spacing' isn't too bad here (much better<br>than 'arraySpacing') but sticking to the term of art 'stride' 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't distinguish between a 'stride' property on<br>MemoryLayout and the 'stride' 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'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'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'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't fight; I'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't muster the energy ;->... but I'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>