<div dir="ltr"><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"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><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>
on Thu Jun 30 2016, John McCall <rjmccall-AT-apple.com> wrote:<br>
<br>
>> On Jun 30, 2016, at 6:12 PM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
</span><div><div class="h5">>> on Thu Jun 30 2016, Matthew Johnson <matthew-AT-anandabits.com <<a href="http://matthew-at-anandabits.com/" rel="noreferrer" target="_blank">http://matthew-at-anandabits.com/</a>>> wrote:<br>
>><br>
>>> Sent from my iPad<br>
>>><br>
><br>
>>>> On Jun 30, 2016, at 6:59 PM, Erica Sadun via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
>>>><br>
>>>><br>
>>>>>> On Jun 30, 2016, at 5:47 PM, James Berry <<a href="mailto:jberry@rogueorbit.com">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">swift-evolution@swift.org</a>> wrote:<br>
>>>>>> on Thu Jun 30 2016, Erica Sadun <erica-AT-ericasadun.com> wrote:<br>
>>>>>><br>
>>>>>>>> On Jun 30, 2016, at 4:41 PM, Dave Abrahams <<a href="mailto:dabrahams@apple.com">dabrahams@apple.com</a>> wrote:<br>
>>>>>>>>> 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>
>>>>>>>><br>
>>>>>>>> OK, I agree with that. If we have “alignment” rather than<br>
>>>>>>>> “defaultAlignment,” I suppose we can have plain “spacing.”<br>
>>>>>>><br>
>>>>>>> No way to last-second sell you on interval rather than spacing?<br>
>>>>>><br>
>>>>>> If you can explain why it's better.<br>
>>>>>><br>
>>>>>>> // Returns the least possible interval between distinct instances of<br>
>>>>>>> /// `T` in memory. The result is always positive.<br>
>>>>>><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>
>>>>><br>
>>>>> Hmm. Sounds like stride to me. stride or byteStride?<br>
>>>>><br>
>>>>> James<br>
>>>><br>
>>>> FAQ: "Why aren't you using the obvious phrase `stride` for something that clearly<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>
>>><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>
>><br>
>> I don't believe that “stride” *is* the accepted term of art for this<br>
>> meaning. I never heard of the idea of types having an intrinsic<br>
>> “stride” until I arrived on the Swift project. That usage came from<br>
>> “strideof.”<br>
>><br>
>> If you all swear up and down that you've been talking about “the stride<br>
>> of a type” for more than 2 years, I won't fight you on this.<br>
>> Otherwise... well, I still won't fight; I'm being crushed by an<br>
>> avalanche of bikesheds and I can't muster the energy ;->... but I'll<br>
>> forever be plagued by doubts about the name.<br>
><br>
> As the person who originally picked "stride" here, I agree that I've never<br>
> heard of people talking about the "stride" of a type; people talk about striding<br>
> over an array, and they talk about the size of one's stride, and that size<br>
> can be measured in bytes. That's all I was thinking.<br>
><br>
> However, I was just picking a name for an internal implementation concept;<br>
> I did not expect it to be used in the standard library.<br>
><br>
> I don't really like "spacing"; it sounds too much like a synonym for "padding",<br>
> i.e. the amount of empty space between elements rather than the total amount<br>
> of space for each element. But I don't mean to re-open wounds; if people<br>
> have settled on "spacing", have at it.<br>
<br>
</div></div>Better names are always welcome if you can come up with one.<br></blockquote><div><br></div><div>FWIW, courtesy of the thesaurus, curated to eliminate clearly unsuitable words:<br><div>breadth, dimension, expanse, interval, period, space, span, stretch, width</div></div><div><br></div><div>Of these, span might be the most OK.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5"><br>
--<br>
Dave<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>
</div></div></blockquote></div><br></div></div>