• lysdexic@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    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.