December 2018
Intermediate to advanced
414 pages
10h 19m
English
As we've seen in the previous section, protocols cannot be used as types when they are associated with another type, in the form of Self or associated type requirements. Indeed, they can only be used as generic constraints.
In this section, we'll discuss the different opportunities that we have in order to overcome this limitation. A common technique is called type erasure.
Read now
Unlock full access