Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
In this simplified code, we have no special treatment of the different faults; however, in a real implementation, we would need to exercise these different paths.
在这个简化的代码中,我们没有对不同的错误进行特殊处理;不过,在实际的实现中,需要使用这些不同的路径。
If you don't already have 10 years of legacy code that reads, writes, and displays something close to this, you have no hope of implementing it.
如果在读取、编写以及显示类似于该规范的遗留代码方面您不具备10年以上的使用经验,就别指望能够实现该规范。
I'm much better having an exception get handled at the time of input than to let that prop -- that value rather propagate through a whole bunch of code until eventually it hits an error 17 calls later, and you have no clue where it came from.
不是我期望的格式,这时我最好有一个异常处理,而不是让其传下去,这个值传到代码的整个分支,最终会导致一个错误17调用的发生,并且你不知道这个错误是哪里来的。
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
应用推荐