this post was submitted on 25 Oct 2026
371 points (95.1% liked)
Programmer Humor
33844 readers
1680 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
OOP dogma isn't just bad, it's actively harmful. OOP leads to unnecessary boilerplate. Any boilerplate that is not absolutely necessary is noise and bad. Full stop.
Private (Getters/setters): Strictly not a necessity in any sense of the word.
Short functions everywhere.
Short files everywhere.
I prefer to see the steps of execution that are actually happening in the real world on hardware. Not an ivory tower of code that happens to execute.
A bunch of weeks ago the CTO of my company calls me up to ask about my prejudice against the
useStatehook, I'm guessing I've just been giving my team too much shit in code reviews about them using useState hooks and they went to complain to him and he asked me to explain what the value of the useReducer hook was.His background is Java, Microsoft Java, C++, and not much else.
So I was able to explain to him the value of the useReducer hook is a lot like the common class object. In useReducer you're expected to write discreet state mutations and the state could potentially have more than 1 primitive field that gets mutated, and that's just what object classes are! In an object class you're writing methods for mutating the underlying state, the reason I think most people don't feel like these two things are the same is because of the functional appearance of the reducer function and how in object classes you have the
thisas a variable just like any other, so you're not returning a new state.So just like in react where they're installing REDUX (like three generations of their families would be massacred if they didn't) just to write a switch case statement that puts the action in variables in the state. Bad programmers are just bad.
This is just not true. Not only OOP "boilerplate" improves human comrepehension and maintainability it also improves AI ability.
I was under the impression I wouldn't have to defend myself =]
generally agree, probably most devs nowadays do. otherwise there wouldn't be stuff like
@datain lombok.i think the word 'dogma' is pretty good: it takes a good idea (encapsulation) too far. i am not old enough to have been coding when OOP was the new and hot stuff. but i imagine it comes from the idea that it is a good idea to protect private members where needed.
that is not such a bad idea to protect
balancefrom stupid sideeffects.is a nothing burger, as it returns the same reference and does not protect from accidental sideeffects.
IMO C# properties are great for exactly this reason.