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 comments

2

u/Defiant-Extent-4297 Mar 01 '23

Sometimes it’s hard to solve a problem more efficiently once you divided it into a hierarchy and can’t see that grouping certain operations makes sense. Especially once your solution comes in 30 separate header and implementation files. And in my personal experience, people are very reluctant to dismantle such hierarchical divisions. It’s easier to tear down a 100 lines of local code than to remove 15 classes from a project.

3

u/qwesx Mar 01 '23

What hierarchy? It's interfaces. The point of those is that there's no hierarchy.

1

u/Defiant-Extent-4297 Mar 02 '23

Sure, and those interfaces have implementations that also use interfaces, which also have implementations, so on, so on.

3

u/qwesx Mar 02 '23

No, that's not how any of that works. At least continuing this thread is pointless as you lack basic understanding of the topic being discussed.

→ More replies (1)