This is a valid point, but it's tractable in its own specific context (documentation tooling), and doesn't go against the architectural and maintainability aspects of protocol extensions.

I'm not sure about this point though:

what do you mean? That people would want to implement that same extension function in a different way? As far as I can tell, if they do it in their own module, their implementation will override the imported one, but it would be nice to have better disambiguation tools for protocol extensions.

BTW these doesn't apply just to protocols – also to concrete types – but Swift encourages generic programming and reusable algorithms via parametric polymorphism, and protocol-oriented programming is a huge part of that.

3 Likes