At this point, you may be tempted to go one step further and replace the factory method with a full-fledged abstract factory object, as detailed in Design Patterns by Erich Gamma, et al.
此时,您可能很想更进一步并用成熟的抽象工厂对象替换工厂方法,如ErichGamma等人在设计模式中详细描述的那样。
If you are like most of the participants in an experiment by Gilbert et al. (2010) then you'll go for number 1.
如果你和大多数吉尔伯特实验的参与者一样,那么你会选择1号选项。
Well, now I go through code very much like what I did for max val in the first place. I check whether it's 0, et cetera, et cetera.
现在我会捋一遍代码,就像我之前捋maxval函数一样,我会检查它是不是0等等等等。
This is probably the most inefficient way to go about doing things, unless you have memory constraints et al.
这可能是最低效的方法做事情,除非你有内存限制等。
This is probably the most inefficient way to go about doing things, unless you have memory constraints et al.
这可能是最低效的方法做事情,除非你有内存限制等。
应用推荐