4 ms·
> Code duplication should be avoided, but not if the alternative is complicated or highly-coupled code. 100% agree. Along these lines, avoid applying DRY prin
by house9-2 7y ago
> Code duplication should be avoided, but not if the alternative is complicated or highly-coupled code.
100% agree.
Along these lines, avoid applying DRY principles to "incidental duplication"; You can end up coupling completely unrelated code if you are blinded by removing all duplication.
- Ma8ee 7y agoThis is so important! You must have separate functions, even if they contain the exact same code, if they are semantically different.