reject code [计] 作废码
If we were to take the strict position of "never break existing code," we would be forced to reject this useful new feature.
如果我们有严格地立场,“从不破坏现有代码”,那么我们将被迫拒绝这项有用的新功能。
This means that a variable may reject attempts to set its value to something malicious or simply nonsensical by referring to a regular expression (or even a piece of code).
这意味着通过引用正则表达式(或者甚至是一段代码),变量会拒绝将其值设置为某些恶意的值或完全无意义值的尝试。
Initially, writing this code can be a little dreary, but it also has a real advantage in reliability: many mysterious problems instantly disappear if you immediately reject bad data.
在开始时,编写这些代码可能会有一点无聊,不过它对于可靠性确实有好处:如果您拒绝了那些非法数据,许多不可思议的问题马上就会消失。
应用推荐