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

前端 未结 7 1903
情深已故
情深已故 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.

提交回复
热议问题