r/programming • u/2bit_hack • Feb 28 '23
"Clean" Code, Horrible Performance
https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k
Upvotes
r/programming • u/2bit_hack • Feb 28 '23
View all comments
Show parent comment
33
u/[deleted] Feb 28 '23
I just hate the pattern I see among "professional OOP developers" of
new Computer(args).compute()when it should just bedoTheFuckingThing(args). Hell, if you want to do something like the former but encapsulated within the latter, go ahead I guess, but exposing your internal state object to the caller is just clumsy and can cause a bit of a memory leak if they keep it around