Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k views
in Technique[技术] by (71.8m points)

请问在类中有暂时用不到的方法是如何处理?删掉还是注解还是直接放着?

想问下大佬是怎么处理暂时用不到的代码?感觉删掉如果以后要重新找git历史又很麻烦。不删掉注释的话又很多很乱。不管的话也感觉太多了不是很爽?有没有什么更好的方法?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

可能马上就要用到就注释
不知道有啥用就删,提交记录里写好删了
还可以挪到别的地方,写进文档里,巴拉巴拉,总之具体情况具体分析,满足自身需求就好


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...