Summary
In this chapter, we jumped deep into Swift and the unique and most advanced features that lie in its powerful type system. Now, protocols with and without associated type and generics, as well as type erasure patterns, should hold no secrets for you.
Now you should be able to effectively employ protocols and their associated types and understand the difference between associated types and generics.
New and powerful features such as conditional conformance should now be mastered and you should be comfortable refactoring your code base to take advantage of it. Lastly, you can use this as a handbook to implement the type erasure pattern and come back to it every time you have a question around this hot topic.
This chapter concludes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access