On Tue, Jul 19, 2016 at 9:00 AM Félix Cloutier <[email protected]>
wrote:

>
> Here's one way this could be implemented: if you write `struct Foo:
> Equatable` without implementing a `func ==`, the compiler makes one for
> you. Done.
>

I floated a draft proposal a while back that addressed exactly this use
case:

https://gist.github.com/allevato/2fd10290bfa84accfbe977d8ac07daad

It's purely additive so it's effectively shelved till post-Swift-3, and
there are still some issues up for debate (the discussion thread was here <
http://thread.gmane.org/gmane.comp.lang.swift.evolution/18495>), but it
would likely address many of these concerns without going to the extreme of
forbidding explicit implementation of Equatable or the other suggestions
offered here (which I wouldn't support).



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

Reply via email to