[英]Delete deprecated code is bad or good idea? [on hold]
In the previous version API, we created a module for creating a schedule in Webservice.在之前的版本 API 中,我们创建了一个用于在 Webservice 中创建计划的模块。 Next week we'll release intermediate version product in production but we have one trouble.
下周我们将在生产中发布中间版本产品,但我们遇到了一个问题。 Customers said that they don't need this functional more.
客户说他们不再需要这个功能了。 I'm a backend developer in this project, I refactored a few domain models and that saves this functional I must to refactored dto, view models and structure database.
我是这个项目的后端开发人员,我重构了一些领域模型,并将这个功能保存到我必须重构的 dto、视图模型和结构数据库中。 PM offers that I should use @Deprecated and save this part of code but I think that we should delete this part of code because in the next version API we have to write another module for creating schedules.
PM 提议我应该使用@Deprecated 并保存这部分代码,但我认为我们应该删除这部分代码,因为在下一个版本 API 中,我们必须编写另一个模块来创建计划。 I know that this part of the code will not be used in the next versions.
我知道这部分代码在以后的版本中不会用到。
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.
Kevlin Henney 认为,这是心态和文化的问题。
more: https://www.infoq.com/news/2017/02/dead-code/更多: https://www.infoq.com/news/2017/02/dead-code/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.