What does “program to interfaces, not implementations” mean?

前端 未结 7 1915
情深已故
情深已故 2020-11-22 07:41

One stumbles upon this phrase when reading about design patterns.

But I don\'t understand it, could someone explain this for me?

相关标签:
7条回答
  • 2020-11-22 08:21

    interfaces describe capabilities. when writing imperative code, talk about the capabilities you are using, rather than specific types or classes.

    0 讨论(0)
提交回复
热议问题