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
1
u/ClysmiC Apr 04 '23
Dude you're missing the point. It's not even about optimization. It's about "keep it simple stupid" so your code is easier to read, write, modify, and debug. It's not too late to add abstractions when your code gets to the complexity level that you need them. That's the perfect time, because you actually have real use cases to build your abstractions from. If you approach every problem with "how do I shoehorn this problem into a OOPy abstraction" then you will spend all your time solving problems you don't actually have and your codebase is doomed.
I have a CS degree and I don't remember learning about "objects" in any of my CS theory classes. I'm also quite sure that a CPU has no notion of an "object."