[swift-evolution] [pitch] Comparison Reform

Xiaodi Wu xiaodi.wu at gmail.com
Thu Apr 13 22:13:22 CDT 2017

On Thu, Apr 13, 2017 at 7:46 PM, Guillaume Lessard <
glessard at tffenterprises.com> wrote:

> > On Apr 13, 2017, at 18:18, Xiaodi Wu via swift-evolution <
> swift-evolution at swift.org> wrote:
> >
> > `compare(_:)` does not merit a term-of-art exception when the Swift name
> is clearly `compared(to:)`.
> No; in full grammatical pedanticity it should be compared(with:).
> “compare to” is for dissimilar things.
> “compare with” is for similar things.
> (I’m not claiming that anyone cares, and I may have a traditional
> interpretation.)

I have read the entirety of the OED entry on "compare," and I have found no
evidence to support that. There are some usages that prefer "to" over
"with," and some vice versa, but it is not by degree of similarity.

> If the whole thing remains couched in terms of comparison, I prefer the
> function to be named compare(_:), because it’s such an everyday term. No
> one expects this action to possibly have a side effect.
> Cheers,
> Guillaume Lessard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170413/ba5ed9ce/attachment.html>

More information about the swift-evolution mailing list