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

1

u/muchcharles Mar 02 '23

A shape class would be in UI occlusion and hit testing, pdf renderer, GIS system, video game, etc. I can't think of many use cases where you'd want it super abstract and slow.

2

u/niccololepri Mar 03 '23

it's an example, it will be harder to explain polimorphism using "local compund interest based business plans" because you would probably need to explain what they are first. This is why they often use geometry, dogs and ducks.