[swift-evolution] [swift-evolution-announce] [Review] SE-0067: Enhanced Floating Point Protocols
Xiaodi Wu
xiaodi.wu at gmail.com
Mon Apr 25 18:07:03 CDT 2016
On Mon, Apr 25, 2016 at 1:32 PM, Stephen Canon via swift-evolution <
swift-evolution at swift.org> wrote:
>
> > On Apr 23, 2016, at 8:53 PM, Brent Royal-Gordon via swift-evolution <
> swift-evolution at swift.org> wrote:
> >> func isEqual(to other: Self) -> Bool
> >> func isLess(than other: Self) -> Bool
> >> func isLessThanOrEqual(to other: Self) -> Bool
> >
> > I'm still not sure why these are methods instead of operators.
> >
> > (I also share others' concern about the argument label on
> `isLessThanOrEqual`.)
>
> There’s lots of concern, and very few suggestions of anything better. The
> only thing that seems workable is maybe `isLessThanOrEqualTo(_:)`, which is
> inconsistent with the other comparisons, but maybe that’s the right thing
> to do anyway.
>
My vote is with using operators, and perhaps actually introducing `<=>` for
total order as suggested elsewhere. Why invent method names for standard
operators?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160425/9315ec3d/attachment.html>
More information about the swift-evolution
mailing list