[swift-evolution] [Review #2] SE-0067: Enhanced Floating Point Protocols

Stephen Canon scanon at apple.com
Mon Apr 25 19:54:34 CDT 2016


> On Apr 25, 2016, at 8:45 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Suggestions re naming of `isLessThanOrEqualTo(_:)`:
> "Less-than" can be regarded as a unit. Thus, `isLessThan(_:)` is reasonable. However, `isEqualTo(_:)` is kind of a stretch, but it could just be `equals(_:)`. Thus, you could have:
> ```
> equals(_:)
> isLessThan(_:)
> isLessThanOrEquals(_:)
> isGreaterThan(_:)
> isGreaterThanOrEquals(_:)
> isTotallyOrdered(below:)

The other thing that comes to mind is:

	isEqual(comparedWith: )
	isLess(comparedWith: )
	isLessOrEqual(comparedWith: )

	isTotallyOrdered(below: )

I don’t love these either, but something in this direction may be workable.
– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160425/33e978b1/attachment.html>


More information about the swift-evolution mailing list