It took me a while to understand what you want to achieve here.
Using associatedtype
with a protocol confused me a lot. If Swift ever gonna support this, IMO, it deserves a separate keyword - associatedconstraint
or associatedprotocol
.
Second mechanism is more intuitive for me, and it also eliminates the need for self conformance in many cases. I was proposing it here - Existential subtyping as generic constraint.