Opinions on how to deal with duplicate code.
ursakhiin @ ursakhiin @beehaw.org Posts 1Comments 379Joined 2 yr. ago
ursakhiin @ ursakhiin @beehaw.org
Posts
1
Comments
379
Joined
2 yr. ago
Deleted
Permanently Deleted
Deleted
Permanently Deleted
If the only difference between two classes or structs is hard coded config, rewrite to be a single implementation and pass the configs in.
If it's more in depth than that it may not be worth refactoring but future copies should be designed more generically.