Could someone explain the pros of deleting (or keeping) unused code?

前端 未结 11 991
温柔的废话
温柔的废话 2020-12-12 11:01

I have heard many times that unused code must be deleted from the project. However it is not clear for me \"why?\".

My points for not deleting that are:

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 11:53

    This discussion is several years old, but I just ran into it...

    One thing that I did not see mentioned is the work that must be incurred to remove the unused code. In many cases, the time and effort to remove the unused code is not trivial in nature, plus there are typically additional costs to test and document the refactored system. Just another thing to consider in the decision process.

提交回复
热议问题