在上一版本的API中,我们创建了一个用于在Webservice中创建计划的模块。下周我们将发布生产中的中间版本产品,但我们遇到了一个麻烦。客户表示他们不再需要这个功能了。我是这个项目的后端开发人员,我重构了一些领域模型,并且保存了这个功能,我必须重构 dto、 View 模型和结构数据库。 PM建议我应该使用@Deprecated并保存这部分代码,但我认为我们应该删除这部分代码,因为在下一个版本的API中我们必须编写另一个模块来创建时间表。我知道这部分代码在接下来的版本中不会使用。
最佳答案
Dead code needs to be found and removed; leaving dead code in is an obstacle to programmer understanding and action, and there’s the risk that the code is awakened which can cause significant problems. Deleting dead code is not a technical problem; it is a problem of mindset and culture, argued Kevlin Henney.
关于java - 删除已弃用的代码是坏主意还是好主意?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58029006/