Thanks for all the recent feedback on this proposal! I’ll try to address some of that here.
First, I agree with @taylorswift that we should not treat a default implementation like an overload, even though it might appear that way just by looking at the symbol signatures. Much like a class and a structure cannot be overloads of one another, a protocol requirement and a default implementation cannot be overloads of one another. As such, we should maintain distinct pages for a protocol requirement and its default implementation.
Of course, a protocol requirement itself can have overloads, like this:
protocol MyProtocol {
func doSomething(thing: String)
func doSomething(thing: Int)
}
These should get the same merged-page behavior that other overloads get, as should any corresponding implementations. But the requirements and the implementations don’t mix.
Regarding generic constraints, DocC doesn’t currently distinguish whether these came from the enclosing extension or from the symbol declaration, and this proposal doesn’t aim to alter that. Under this proposal, DocC ignores all generics for the purpose of determining whether two symbols are overloads of one another.
Regarding the concern about a pathologically long overload list, it’s worth considering how to streamline the presentation of those in a future proposal. However, that appears to be a fairly rare situation in practice, and I don’t think a long list of that kind will be worse under this proposal than it is today, where you get a long list of symbols appearing instead a level up in the hierarchy. Under this proposal, you will at least have a way of condensing that list, as when you look at the default view of a merged page.
More generally, as mentioned in the original post, I definitely agree that there is room to expand on this proposal in the future — for example, by adding syntax to enable writers to define manual overload groups as a supplement to the purely data driven ones in this proposal. But I think what’s in the proposal now provides a lot of value, while laying the groundwork for future enhancements.