首页 > 其他 > 详细

[notes] some code tips

时间:2015-08-06 01:57:06      阅读:291      评论:0      收藏:0      [点我收藏+]
genericizing-code

genericizing-code

原文链接: http://ericasadun.com/2015/07/31/genericizing-code/

Prefer functionality over implementation

?Focus your code on the connections between data creation and data consumption instead of the particulars of specific types.关注于数据创建和数据消费的关系

It’s never too late to refactor

Watch out for repeated code across different types

One protocol does not rule them all

Differentiate type constraints from parameter constraints

Conform at the highest possible level

Design with collections in mind

[notes] some code tips

原文:http://www.cnblogs.com/xilifeng/p/4706280.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!