开发多年,潜移默化的,我习惯了在稳定的根基上构建代码, 重构,改善代码既有设计是本神书,推荐大家看看,里面套路包满满,例如代码意图与实现分离这句话,我在第一次看到时感受到了震撼,突然觉得自己之前写代码好sb. 然后随阅读量上升,当我看到这段文字时 An algorithm can be regarded as consisting of a logic component, which specifies the knowledge to be used in solving problems, and a control component, which determines the problem-solving strategies by means of which that knowledge is used. The logic component determines the meaning of the algorithm whereas the control component only affects its efficiency. The efficiency of an algorithm can often be improved by improving the control component without changing the logic of the algorithm. We argue that computer programs would be more often correct and more easily improved and modified if their logic and control aspects were identified and separated in the program text. 以及google 整理术后,更明白为啥要那样处理了。