Best Practices for Removing Unused Code

后端 未结 8 1234
花落未央
花落未央 2021-02-07 17:56

I\'d like to know what people\'s best practices are for removing unused code. Personally I\'m a fan of deleting (not just commenting) anything that\'s not currently being used.

8条回答
  •  [愿得一人]
    2021-02-07 18:31

    If you are using a source control system, deleting the code is my preferred option.

    It won't get in your way when working with the current code, and you'll always have the code in the repository if you ever need it again.

提交回复
热议问题