永远为真的 if 条件的术语
Term for an if condition that is always true
如何称呼条件始终为真的 if
,如下所示?
if (functionThatAlwaysReturnsTrue()) {
// Some code that always runs
}
这是一条提交消息,解释了这段代码的出现时间和原因。
在逻辑世界中,这些被称为 tautologies。
In logic, a tautology (from the Greek word ταυτολογία) is a formula that is true in every possible interpretation.
例如函数...
function isHungry() {
return true;
}
将始终计算为真,并且将被视为 重言式函数。
如何称呼条件始终为真的 if
,如下所示?
if (functionThatAlwaysReturnsTrue()) {
// Some code that always runs
}
这是一条提交消息,解释了这段代码的出现时间和原因。
在逻辑世界中,这些被称为 tautologies。
In logic, a tautology (from the Greek word ταυτολογία) is a formula that is true in every possible interpretation.
例如函数...
function isHungry() {
return true;
}
将始终计算为真,并且将被视为 重言式函数。