The highlighted section in Listing 7 shows a small portion of an example of a long method code smell.
清单7中高亮显示的部分展示了一个长方法代码味道示例的一小部分。
In this example, the long method has been broken into smaller methods that each do one thing and do it well.
在这个示例中,将一个很长的方法分解为几个短方法,并且让每个短方法负责一件事情。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
MartinFowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
In his book, Refactoring, Martin Fowler describes the issue with the long Method code smell quite nicely as "the longer a procedure is, the more difficult it is to understand."
MartinFowler在他撰写的Refactoring这本书中,对代码中存在冗长方法的气味这个问题做了精妙的描述——过程越长,越难理解。
应用推荐