后端

An Introduction to Protocol-oriented Programming in 斯威夫特

By 亚历山大Gaidukov

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.

9分钟阅读继续阅读

加入总冠军® 社区.