SE-0215 - Conform Never to Equatable and Hashable

Moderate -1. Never is special because it has no instances - it is uninhabited by design. This means that it can conform to all protocols. I'd rather see a global solution rather than cherry picking these two specific protocols.

Also, in the discussion of Never, it was pointed out that there are multiple different names that a bottom type might have and people might want to define their own. It seems that the "auto conformance to all protocols" behavior should apply to any fixed contents empty enum type, not just Never specifically.

It is probably worth solving this problem, but the motivation section of the proposal is not particularly strong. It doesn't explain specific use cases or give convincing examples of problems being solved, it talks about things abstractly.

I don't think this is an urgent problem, and would prefer to see a more global solution be investigated. If there is no better solution then perhaps this is a practical stopgap. I don't think that the rationale that a global solution "would require a lot more work to determine the design" (as stated in the alternatives considered section) is adequate justification to not do that work.

n/a

I read the proposal but did not follow any of the pitch threads.

-Chris

14 Likes