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

相关文章:

  • 2022-01-08
  • 2021-10-05
  • 2021-10-20
  • 2022-12-23
  • 2019-03-07
  • 2022-01-26
  • 2022-01-20
  • 2021-06-27
猜你喜欢
  • 2021-06-07
  • 2022-01-20
  • 2021-07-23
  • 2022-02-19
  • 2021-08-22
  • 2022-12-23
相关资源
相似解决方案