[swift-evolution] [Accepted] SE-0185 - Synthesizing Equatable and Hashable conformance
swift-evolution at haravikk.me
Thu Aug 17 07:00:12 CDT 2017
> On 17 Aug 2017, at 11:42, Robert Bennett <rltbennett at icloud.com> wrote:
> Chris mentions that the intent was to mimic a default implementation in a constrained protocol extension, with one extension per type that doesn’t define its own ==/hashValue while conforming to Equatable/Hashable. Constrained extensions are allowed to use type information from the constraint, so I don’t think there is an issue here.
And I disagree; this isn't a constraint extension either, not even close, we're talking here about automatic behaviour based upon variables the protocol knows literally nothing about, in a way that can result in new errors that are currently impossible (as you can't currently conform to Equatable without providing some kind of code to implement it).
It is no more comparable to a constrained extension than it is to a default implementation, as it is neither of these things; both of those are well defined by their very nature, this instead is utterly arbitrary. There is no justification that will make that any less true.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution