Hi Howard, thanks for the feedback.
> On Apr 14, 2016, at 6:05 PM, Howard Lovatt <howard.lov...@gmail.com> wrote:
>
> +1 great addition.
>
> Would suggest the naming could be more consistent, in particular:
> Anything returning Self could be named xxxed. In the current proposal this
> naming convention is sometimes used, e.g. divided, and sometimes not, e.g.
> subtracting. Suggest all unified with the xxxed convention.
The names in the Arithmetic protocol are Dave A’s creation, but I think they’re
a reasonable compromise given the constraints placed on us. While consistency
would be nice, I think that clarity at use site is more important, under the
rationale that code is read more often than written. Also, keep in mind that
in practice, “everyone” will use the operators for arithmetic. Dave may have
more to say on the subject.
> Anything returning Bool could be named isXxx. In some cases this is used,
> e.g. isUnordered, but not others, e.g. totalOrder.
That’s a reasonable point. isTotallyOrdered(with: ) is simple, but I’m not
sure how I would handle totalOrderMagnitude( ) under this scheme. Thoughts?
Thanks,
– Steve
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution