[swift-evolution] [Proposal] Instance Operators

davesweeris at mac.com davesweeris at mac.com
Fri Mar 4 15:53:09 CST 2016


Why not do it the other way around, like this?
func == <T: Equatable> (lhs: T, rhs: T) -> Bool {
	return T.equals(lhs, rhs)
}
> On Mar 4, 2016, at 3:40 PM, Haravikk via swift-evolution <swift-evolution at swift.org> wrote:
> 
> ...
> This should be relatively simple to implement since in many ways we’re actually just getting rid of a feature, though of course the impact on code is more complex and probably not an easy one to convert automatically (as it would mean somehow pulling global == declarations into a local .equals() method and similar on affected types).
> 
> But I think in the long run it’s a cleaner system, and offers all the flexibility we need.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list