We’ve had a slight change to our system which means what used to be two related business rule are now the exact same rule. Because of this, I’ve generalised the implementation and I’m wondering what to do with the old specified classes related to them.
Is it lazy to leave the old classes lying around and just inheriting the new generalised version (with no extra content, just empty classes)? Or is it sensible because it saves a good deal of refactoring?
The interface is the same regardless – so I’m curious : epically lazy, or cunningly avoiding unnecessary refactoring?
From pure OO design perspective, you should clean up the code.
From software delivery perspective, there are reasons why you may not want to do that:
Minimize amount of unnecessary changes to the code. helps with investigations in production issues.
Save the opportunity cost of re-factoring and use it on something more beneficial.