OK. The other thing I want to say here, is that this style of program we just wrote is actually a very common one. And we're going to give it a nice little name, often referred to as exhaustive enumeration.
好,另外一件我想说的事情是,刚才我们写的代码的风格,是非常普通的,我们会给这个风格一个名字,通常是被称为详尽的列举。
And just as with variables, you should use some common sense, some style here, and the function's name should X Y communicate what it does, calling it X or Y or Z is generally not all that helpful.
就像变量,你使用一些常识,一些类型,和函数名需要,传达它所做的事情,把它叫做,或者Z通常是没有什么用处的。
应用推荐