Alexito's World

A world of coding 💻, by Alejandro Martinez

Protocols in Swift, the ongoing discussion

Protocols in Swift are really powerful thanks to be able to be generic and to protocol extensions. But there is some things that drive us nuts. Mainly the usage of generic protocols in collections.

Brent Simons has been talking a lot about this topic and in his Swift Diary #12 he also links to a couple of interesting articles.

I’ve just read The Genius of Protocols and it looks to me as one of the best posts about protocols out there. It describes Objective-C protocols, the possibilities of Swift protocols but also shows some of their limitations. Is really worth a read.

I also want to point out to the interesting conversation in Twitter about Brent’s post, most importantly to this two tweets from Joe Groff.

If you liked this article please consider supporting me