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

Dave Abrahams dabrahams at apple.com
Sun May 1 19:01:12 CDT 2016


on Sun May 01 2016, Xiaodi Wu <swift-evolution at swift.org> wrote:

> A clash of names is inelegant, but in practice, I'm not actually sure that
> there's really a lack of clarity. IMO, `stride(of: Int)` is not really
> misinterpretable as anything else.

I disagree, especially since `Strideable` has an associated `Stride` type.

> On Sun, May 1, 2016 at 12:08 PM, Shawn Erickson
> <shawnce at gmail.com> wrote:
>
>     I personally kinda want to see these namespaced instead of global functions.
>     That could possibly allow clarity in naming.
>
>     -Shawn
>
>     On Sun, May 1, 2016 at 2:55 AM Brent Royal-Gordon via swift-evolution
>     <swift-evolution at swift.org> 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:)
>
>         --
>         Brent Royal-Gordon
>         Architechies
>
>         _______________________________________________
>         swift-evolution mailing list
>         swift-evolution at swift.org
>         https://lists.swift.org/mailman/listinfo/swift-evolution
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-- 
Dave



More information about the swift-evolution mailing list