Low coupling
Coupling is the measure of code dependency. We always want to reduce coupling and make our code components as independent of each other as possible. Low coupling allows us to change a component without affecting other code components. Low-coupled code is easier to read because each component has its own relatively small area of responsibility, though we need to understand only this code without spending time on figuring out how the entire system works.
Immutability helps in achieving low coupling. Immutable data can be safely passed through different code blocks without worrying about it being transformed and affecting other parts of the code. Pure functions transform the data and return the result without affecting the input ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access