旧代码在评论中 [英] Old Code in comments
问题描述
在代码库中注释掉旧代码需要多长时间?承包商继续将旧代码保存在代码库中,将其转换为注释。这真的很令人沮丧,我希望他们只是删除旧的代码,而不是注释掉。
How long should you keep old code commented out in your code base? The contractors continue to keep old code in code base by turning it into comments. This is really frustrating and I want them to just remove the old code instead of commenting it out.
有没有合理的理由在代码库中保留旧代码作为注释?我使用Visual Sourcesafe的版本控制
Is there a valid reason to keep old code in the code base as comments? I am using Version control by Visual Sourcesafe
推荐答案
如果你使用像SVN或CVS,我会擦掉他们的视线。
If you use something like SVN or CVS, no. I would erase them on sight. They make code less readable.
注释应该在那里帮助正在阅读代码,解释东西等的程序员。
Comments should be there to help the programmer who is reading the code, explain stuff, etc.
这篇关于旧代码在评论中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!