Hey just looking for some general advice, I’m wondering what kind of compromises I should make when keeping my code D.R.Y, in my program I have a command manager that accepts enums, and it kind of works like this
if command is “move items”
for loop etc.
if command is “delete items”
code, repeated for loop and variables
I’m just wondering how much I should worry about keeping things D.R.Y. in this instance, as the function I have here is super organized with the small drawback that it is not really that D.R.Y at all as if there is more then 10 commands they all end up kind of using the same code. what should I worry about with DRY, is it that it will be difficult to change later, or is it performance, or is it readability. because I could create complex if statements with lots of && and || variables and re-factor how I have it, but it works as is. just looking for some insight on when DRY almost becomes redundant. thanks