In many Swift OSS repositories (such as swift-foundation, swift-syntax, etc.),
I noticed that types often explicitly declare conformance to both Equatable and Hashable,
even though Hashable already inherits from Equatable.
I've seen this in a lot of private code, also. I'd bet that most of the time it's just because something was Equatable and then, later on, needed to be Hashable, too, so someone (maybe me!) just added it without thinking through that they could simplify. I bet there are linters that can catch this.
indeed – digging into a couple of the examples from OP's github query, it seems that's precisely what happened here & here. personally i think explicit enumeration, while redundant, makes the code a bit more clear. i'd also be curious to hear if there are other reasons to do this one way or another – e.g. does it make anything more or less difficult for the compiler/macros/other source tooling?
It makes sense that redundant conformance often arises from evolution over time, or out of tooling limitations.
I also appreciate the perspective on clarity-through-explicitness, especially in teams or OSS contexts where the design intent may not be immediately obvious.
I’ll keep that in mind when reviewing or writing code going forward.