[swift-evolution] Trial balloon: conforming sizeof, sizeofValue, etc. to naming guidelines

Xiaodi Wu xiaodi.wu at gmail.com
Sun May 1 09:58:55 CDT 2016


On Sun, May 1, 2016 at 4:54 AM, Brent Royal-Gordon <brent at architechies.com>
wrote:

> > With the renaming proposed above, stride(of:) will appear to be related
> to stride(from:to:by:). This conflict arises from a pre-existing issue;
> namely, the term "stride" is used to mean two different things. Although
> moving the preposition only highlights the issue, one possible resolution
> is to rename strideof(_:) to strideSize(of:) and strideofValue(_:)
> tostrideSize(ofValue:).
>
> I wonder if it might make sense to rename all of these, then?
>
>         instanceSize(of:)
>         instanceSize(ofValue:)
>         alignmentSize(of:)
>         alignmentSize(ofValue:)
>         strideSize(of:)
>         strideSize(ofValue:)
>

That is an alternative, definitely. I'll add that in. alignof isn't really
a size, though, so there's some bikeshedding to be done if going down that
route. Personally, I'm a fan of minimalist changes and I'm not enamored
with strideSize(of:) in the first place. There's work afoot to make changes
to striding, so stride(from:to:by:) may not necessarily be long for this
world in any case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160501/94a9f4f3/attachment.html>


More information about the swift-evolution mailing list