What is the meaning and reasoning behind the Open/Closed Principle?

后端 未结 14 1203
死守一世寂寞
死守一世寂寞 2020-12-02 08:31

The Open/Closed Principle states that software entities (classes, modules, etc.) should be open for extension, but closed for modification. What does this mean, and why is i

14条回答
  •  难免孤独
    2020-12-02 08:53

    This means that the OO software should be built upon, but not changed intrinsically. This is good because it ensures reliable, predictable performance from the base classes.

提交回复
热议问题