In the last two weeks (episodes #33 and #34) we explored the idea that protocols could largely be translated into concrete datatypes, and in doing so we fixed some of the problems that protocols have, but more importantly, we opened up the doors to some amazing compositions that were completely hidden from us with protocols. Towards the end of those two episodes we claimed that knowing this correspondence between protocols and concrete datatypes could actually lead us to better API and library design, but stopped short on the details.
Well, we want to describe that, but before we can get there we need to go a little deeper with this correspondence. Currently our dictionary to translate between the world of protocols and the world of concrete types is woefully incomplete. There are tons of protocol concepts that we haven’t yet described how to translate over to concrete types, and knowing that information will provide us the tools we need to tackle API and library design. So, that is this week’s goal!
But first, we want to introduce a lil clean up terminology that we’ve been using on the series…