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.
@Kickingbear @gte We have limitations that make writing and working with those abstract types ugly, but we're not done yet.— Joe Groff (@jckarter) agosto 14, 2015
@Kickingbear @gte ObjC and the ObjC runtime also aren't going away. Using @objc for things still we suck at natively is good and encouraged.— Joe Groff (@jckarter) agosto 14, 2015
If you liked this article please consider supporting me