41

Go编程技巧之“延后抽象”

 6 years ago
source link: https://zhuanlan.zhihu.com/p/35888536?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
鲁迅曾经说过,复杂的问题都能用增加一层抽象来解决。(鲁迅: 我特么没说过!)在实际工程中,为了解耦,可能需要定义大量的接口。如在用户管理系统中,可能含有一个像根据用户名检索用户的服务 UserSearcher:ty…

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK