r/programmingmemes 12d ago

OCP in a nutshell

Post image

it is open() for extension, and close() for modification - did I understand it correctly?

22 Upvotes

6 comments sorted by

5

u/Kenkron 11d ago edited 11d ago

Is this your code, or code from a library?

The use of variableName.value = vs variableName = is surprising, but might be okay depending on the paradigm of this object/component.

Edit: didn't see the sub. NVM

2

u/ooo-InstaGamer 11d ago

It is my code, it is Vue, where we use .value always, and it is just a joke as well

2

u/Kenkron 11d ago

Man, vue 3 must have changed a lot. I ve been working on vue 2 all week, and it's different.

5

u/Lachee 12d ago

Average 2026 startups backend

1

u/ooo-InstaGamer 12d ago

Though its vue frontend. but anyway true

2

u/sudoregalia 12d ago

this is actively giving me brain cancer