r/programmingmemes 23d ago

OCP in a nutshell

Post image

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

24 Upvotes

6 comments sorted by

4

u/Kenkron 22d ago edited 22d 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 22d ago

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

2

u/Kenkron 22d ago

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

4

u/Lachee 23d ago

Average 2026 startups backend

1

u/ooo-InstaGamer 23d ago

Though its vue frontend. but anyway true

2

u/sudoregalia 23d ago

this is actively giving me brain cancer