Most modern programming languages, in the hopes of enhanced maintainability and reusability of code, offer some constructs that help the developer keep the definition of behavior and its implementation separate. 斯威夫特 takes the idea of interfaces a step further with protocols. With protocols and protocol extensions, 斯威夫特 allows 开发人员 to enforce elaborate conformity rules without compromising the expressiveness of the language. 在本文中, Toptal Software Engineer Alexander Gaidukov explores 斯威夫特 protocols and how protocol-oriented programming can improve the maintainability and reusability of your code.
World-class articles, delivered weekly.
Subscription implies consent to our 隐私政策
谢谢你!!
Check out your inbox to confirm your invite.
加入总冠军® 社区.