使用未使用的功能会有什么后果 [英] what are the consequences of having unused functions

查看:33
本文介绍了使用未使用的功能会有什么后果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在代码中使用未使用的函数会带来什么/如果有什么后果?

I'm wondering what / if any consequences there are in having unused functions in code?

如果您查找并删除所有未使用的函数和变量,那么性能会有明显的改善吗?

If you hunt down and remove all unused functions and variables would there be any percievable improvement in performance?

还是删除未使用的函数和变量只是一种好习惯?

Or is it just good practice to remove unused functions and variables would?

推荐答案

未使用的函数不会损害性能.对于正在维护代码的人来说,这使工作变得更加困难.现代IDE跟踪未使用的函数/方法和变量.如果您所说的技术不是这种情况,那么维护人员将不得不考虑认为有必要的未使用代码.

Unused functions can't harm performance. They are making the job harder for guys who are maintaining the code. Modern IDE's keep track of unused functions/methods and variables. If it's not a case with the technology that you are speaking about maintainers will have to deal with unused code thinking it's necessary.

这篇关于使用未使用的功能会有什么后果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆