Are empty abstract classes a bad practice, and why?

后端 未结 11 2032
南方客
南方客 2021-01-02 01:17

We have several empty abstract class in our codebase. I find that ugly. But besides this very stupid reason (ugliness), should I refactor it (into empty interface e.g.) ?

11条回答
  •  梦谈多话
    2021-01-02 01:44

    Ask yourself this question: If, as a result of your refactoring, something breaks in production and your continued employment depends on how well you justify your decision to spend time fixing something that wasn't actually broken, what do you say?

    "It was ugly and aesthetically offensive to me" isn't an answer I'd like to stake my job on.

    At this stage, I say play it safe and live with the Ugly.

提交回复
热议问题