Skip to content
loading...

re: Open/Closed Principle VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The point is to be able to extend system for cheap. So you won't have to make changes to your class/module every time you need to extend it. So thi...
 

Maybe i am missing something important here.

How does "not having to make changes to your classes" help to keep complexity low?

In the example you gave about the cookie machine, I would agree. It is a good way to extend the possibilities of the CookieMachine class, and it seems more flexible, but it actually seems to me like the complexity is bigger, than just adding a new "case".

code of conduct - report abuse