5 ms·
There is a simple merit: if some code is complicated enough to make you think twice before modifying it because you’ll need to modify all the copies (and you re
by EugeneOZ 3y ago
There is a simple merit: if some code is complicated enough to make you think twice before modifying it because you’ll need to modify all the copies (and you realize that it will be not easy) - then it is better to make this code DRY.
There are some simple pieces of code that are cheap to copy and modify later. And nothing wrong will happen if you do not apply future modifications to every copy. A code like this doesn't have to be DRY.