Thinking about it more, if you were to change Node
and Child
protocols to use associated type Self
, they both become equivalent and you could remove one of them and replace its uses with another without any change in the behaviour of your code. That's because you wouldn't be able to use those PATs in places where it matters, only in protocol inheritance/conformance declarations and generic constraints. That is the case as long as Self
requirements on protocols prevent those from being used as existentials or until opaque types are introduced. As soon as that restriction is lifted you'd be able to use Node
and Child
as existentials (or opaque types) again for concrete types, type casts and type comparisons, where different names do matter even though the protocols are structurally equivalent.