码迷,mamicode.com
首页 > 其他好文 > 详细

[notes] some code tips

时间:2015-08-06 01:57:55      阅读:104      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!