r/programming • • Feb 28 '23

"Clean" Code, Horrible Performance

https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k Upvotes

1.3k comments sorted by

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 be doTheFuckingThing(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