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:
- Code is already written, and efforts are spent
- Code may be tested on syntetical and real environment
- If organized well (grouped, separate package, loosely coupled etc) it doesn't disturbs you on overall code analysis or refactoring
- Code may be used in future
- When deleted, author may feel uncomfortable
Could someone explain the pros of deleting (or keeping) unused code?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…