[swift-evolution] [swift-evolution-announce] [Review] SE-0067: Enhanced Floating Point Protocols
Chris Lattner
clattner at apple.com
Wed Apr 27 00:22:11 CDT 2016
On Apr 26, 2016, at 7:34 PM, Tony Allevato via swift-evolution <swift-evolution at swift.org> wrote:
> Would something like this be possible? Imagine protocols defined like this:
>
> public protocol Equatable {
> static func == (lhs: Self, rhs: Self) -> Self
> }
The problem is that every type that conforms to Equatable has to provide an overload of == in order to conform. This is exactly what having named methods as requirements solves.
-Chris
More information about the swift-evolution
mailing list