On Sun, May 1, 2016 at 7:01 PM, Dave Abrahams via swift-evolution <
[email protected]> wrote:

>
> on Sun May 01 2016, Xiaodi Wu <[email protected]> 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.


Is the naming infelicitous? Yes, no argument from me here.

But: I'd guess that Strideable, being a protocol for numeric types, comes
into the picture mostly when implementing generic numeric algorithms, and
its associated Stride type (if I remember correctly from reading code
comments) should really be Distance but for current limitations in the
language. I have no doubt that someone who knows the insides of Strideable
to that level of detail has the expertise and imagination to conjure up a
meaning for `stride(of: Int)` other than the stride size in bytes of
consecutive Ints, but I venture that it'd still take some effort and
wouldn't be an unintentional misunderstanding :P
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to