You are viewing a single thread.
View all comments 9 points
Duplicate code can be a code smell, but it’s far better to have the same function definition or code block appear twice in the code than extracting a function that tightly couples two components that should not be coupled at all.
See Write Everything Twice (WET) principle.
3 points