This would be very handy! It’s one of those rare scenarios where I think “I 
can’t believe Swift makes me type all this out, there must be an easier way”.

I think explicitly conformance to Equatable and Hashable would be preferable. 
This means if one of the members is not Equable/Hashable, the user knows by 
getting an error of ‘Does not conform to Equatable, must implement func ==’ at 
the type level rather than scratching their head when instances are not 
automatically Equatable. It also means code is only generated when it is needed.

There’s a small typo (before [sic] below):

> On 26 May 2016, at 4:28 AM, Tony Allevato via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> As with raw-value enums today, should the derived conformance be completely 
> explicit [sic], or should users have to explicitly list conformance with 
> Equatable and Hashable in order for the compiler to generate the derived 
> implementation?

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to