<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jun 30, 2016, at 10:41 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 1, 2016 at 12:03 AM, Dave Abrahams via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><br class="">
on Thu Jun 30 2016, John McCall &lt;<a href="http://rjmccall-at-apple.com" class="">rjmccall-AT-apple.com</a>&gt; wrote:<br class="">
<br class="">
&gt;&gt; On Jun 30, 2016, at 6:12 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class="">
</span><div class=""><div class="h5">&gt;&gt; on Thu Jun 30 2016, Matthew Johnson &lt;<a href="http://matthew-at-anandabits.com" class="">matthew-AT-anandabits.com</a> &lt;<a href="http://matthew-at-anandabits.com/" rel="noreferrer" target="_blank" class="">http://matthew-at-anandabits.com/</a>&gt;&gt; wrote:<br class="">
&gt;&gt;<br class="">
&gt;&gt;&gt; Sent from my iPad<br class="">
&gt;&gt;&gt;<br class="">
&gt;<br class="">
&gt;&gt;&gt;&gt; On Jun 30, 2016, at 6:59 PM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class="">
&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; On Jun 30, 2016, at 5:47 PM, James Berry &lt;<a href="mailto:jberry@rogueorbit.com" class="">jberry@rogueorbit.com</a>&gt; wrote:<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; On Jun 30, 2016, at 4:05 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; on Thu Jun 30 2016, Erica Sadun &lt;<a href="http://erica-at-ericasadun.com" class="">erica-AT-ericasadun.com</a>&gt; wrote:<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Jun 30, 2016, at 4:41 PM, Dave Abrahams &lt;<a href="mailto:dabrahams@apple.com" class="">dabrahams@apple.com</a>&gt; wrote:<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I mentioned this in a comment on the gist already, but I'm really not<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; digging the "array" in `arraySpacing`. We've already moved from top-level<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "stride" to "memory layout spacing," gaining plenty of clarity. I'm<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; skeptical that the "array" adds anything more. Moreover, it muddies the<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; waters by mentioning a specific type (Array) in a context where you're<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; querying the memory layout properties of another type.<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; OK, I agree with that.&nbsp; If we have “alignment” rather than<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; “defaultAlignment,” I suppose we can have plain “spacing.”<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt; No way to last-second sell you on interval rather than spacing?<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; If you can explain why it's better.<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt; // Returns the least possible interval between distinct instances of<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;&gt; /// `T` in memory.&nbsp; The result is always positive.<br class="">
&gt;&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; For me, “interval” doesn't go with “size” and “alignment,” which are all<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; about physical distances and locations.&nbsp; There are all kinds of<br class="">
&gt;&gt;&gt;&gt;&gt;&gt; “intervals,” e.g. time intervals.<br class="">
&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt; Hmm. Sounds like stride to me. stride or byteStride?<br class="">
&gt;&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt;&gt; James<br class="">
&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt; FAQ: "Why aren't you using the obvious phrase `stride` for something that clearly<br class="">
&gt;&gt;&gt;&gt; returns the memory stride?"<br class="">
&gt;&gt;&gt;&gt;<br class="">
&gt;&gt;&gt;&gt; ANSWER: "As stride already has a well-established meaning in the standard library,<br class="">
&gt;&gt;&gt;&gt; this proposal changes the name to spacing, providing a simple but correct name that<br class="">
&gt;&gt;&gt;&gt; works well enough in its intended use. Measuring memory is sufficiently esoteric<br class="">
&gt;&gt;&gt;&gt; that we prefer to reserve `stride` for a more common use case."<br class="">
&gt;&gt;&gt;<br class="">
&gt;&gt;&gt; Counter: some words have more than one well established meaning when<br class="">
&gt;&gt;&gt; used in different contexts.&nbsp; 'spacing' isn't too bad here (much better<br class="">
&gt;&gt;&gt; than 'arraySpacing') but sticking to the term of art 'stride' would be<br class="">
&gt;&gt;&gt; best IMO.&nbsp; As James mentioned, spacing implies empty space *between*<br class="">
&gt;&gt;&gt; items whereas stride matches the meaning of this property *exactly*<br class="">
&gt;&gt;&gt; (which is why it is the term of art).<br class="">
&gt;&gt;&gt;<br class="">
&gt;&gt;&gt; If a programmer can't distinguish between a 'stride' property on<br class="">
&gt;&gt;&gt; MemoryLayout and the 'stride' function they probably have no business<br class="">
&gt;&gt;&gt; doing anything which requires use of MemoryLayout in the first place.<br class="">
&gt;&gt;<br class="">
&gt;&gt; I don't believe that “stride” *is* the accepted term of art for this<br class="">
&gt;&gt; meaning.&nbsp; I never heard of the idea of types having an intrinsic<br class="">
&gt;&gt; “stride” until I arrived on the Swift project.&nbsp; That usage came from<br class="">
&gt;&gt; “strideof.”<br class="">
&gt;&gt;<br class="">
&gt;&gt; If you all swear up and down that you've been talking about “the stride<br class="">
&gt;&gt; of a type” for more than 2 years, I won't fight you on this.<br class="">
&gt;&gt; Otherwise... well, I still won't fight; I'm being crushed by an<br class="">
&gt;&gt; avalanche of bikesheds and I can't muster the energy ;-&gt;... but I'll<br class="">
&gt;&gt; forever be plagued by doubts about the name.<br class="">
&gt;<br class="">
&gt; As the person who originally picked "stride" here, I agree that I've never<br class="">
&gt; heard of people talking about the "stride" of a type; people talk about striding<br class="">
&gt; over an array, and they talk about the size of one's stride, and that size<br class="">
&gt; can be measured in bytes.&nbsp; That's all I was thinking.<br class="">
&gt;<br class="">
&gt; However, I was just picking a name for an internal implementation concept;<br class="">
&gt; I did not expect it to be used in the standard library.<br class="">
&gt;<br class="">
&gt; I don't really like "spacing"; it sounds too much like a synonym for "padding",<br class="">
&gt; i.e. the amount of empty space between elements rather than the total amount<br class="">
&gt; of space for each element.&nbsp; But I don't mean to re-open wounds; if people<br class="">
&gt; have settled on "spacing", have at it.<br class="">
<br class="">
</div></div>Better names are always welcome if you can come up with one.<br class=""></blockquote><div class=""><br class=""></div><div class="">FWIW, courtesy of the thesaurus, curated to eliminate clearly unsuitable words:<br class=""><div class="">breadth, dimension, expanse, interval, period, space, span, stretch, width</div></div><div class=""><br class=""></div><div class="">Of these, span might be the most OK.</div></div></div></div></div></blockquote><div><br class=""></div></div>Another thought is "arrayElementSize", or "sizeAsArrayElement", or "sizeInArray". &nbsp;Somewhat verbose, though.<div class=""><br class=""></div><div class="">John.</div></body></html>