OK. Note, by the way, if I chase through each possible path, like there's some IFs in here, if there's some places to go, at least in this piece of code, every possible path through this code ends in a return. And that's a good programming discipline, to make sure that happens.
注意一下,如果我跟进每一条可能的路径,像是这里的,起码在这段代码中就有很多走向,这段代码中的每一条可能路径,在结尾都会返回一个值,这就是一条很好的编程定律,请确保这样做。
计算机科学及编程导论课程节选 : 麻省理工公开课