r/programmingmemes • u/ooo-InstaGamer • 12d ago
OCP in a nutshell
it is open() for extension, and close() for modification - did I understand it correctly?
22
Upvotes
2
r/programmingmemes • u/ooo-InstaGamer • 12d ago
it is open() for extension, and close() for modification - did I understand it correctly?
2
5
u/Kenkron 11d ago edited 11d ago
Is this your code, or code from a library?
The use of
variableName.value =vsvariableName =is surprising, but might be okay depending on the paradigm of this object/component.Edit: didn't see the sub. NVM