...

/

What’s the Open-Closed Principle?

What’s the Open-Closed Principle?

Get a brief introduction to the open-closed principle.

We'll cover the following...

Overview

The open-closed principle states that every atomic unit of code, such as a class, module, or function, should be open for extension but closed for modification. The principle was coined in 1988 by Bertrand Meyer.

Essentially, it means that, once written, the unit of code should be unchangeable unless some errors ...