> > 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 think this is an *excellent* choice, and I hope it is the first step to 
completely removing operators from protocols.

IMHO throwing operators into protocols is inconsistent and confusing. Having 
regular methods and a single generic version of the operator that calls down on 
the type’s methods is clearer and guarantees that generic code can avoid 
ambiguities by calling the methods directly, instead of having to rely only on 
heavily overloaded global operators.

—
Nicola

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to