Thom Brown-2 wrote
> On 15 April 2014 23:19, Andreas 'ads' Scherbaum <
> > wrote:
>> stumbled over a number of "iff" in the source where "if" is meant - not
>> what the real story behind this is, but attached is a patch to fix the
>> 80 occurrences.
>> This only appears in comments, not in any code path.
> Yeah, apparently those are intentional, and mean "if and only if" (i.e.
Just looking at the first few items someone's good intention is being ruined
by bad execution...especially:
"Add...references to the section...a block is in [iff] chapters aren't
Many of these are not mathematical propositions but flow-control logic for
which "IF" is indeed the correct term-of-art; though re-reading the example
above that is probably one of the more logical ones...
"...new tuple was inserted, and its HEAP_ONLY_TUPLE flag is set [if/iff] a
HOT update was done"
needs to be evaluated on its merits; namely does HEAP_ONLY_TUPLE ever get
set if a HOT update was not done? If not then "IFF" is proper and necessary
to convey that fact (though even this one is marginal and both versions are
likely unambiguous in reality).
In short "returns BOOLEAN" can reasonably be said to properly use "IF" in
almost all cases - especially for those functions that are check-oriented
(and thus obviously if the opposite condition is present the opposite result
would be returned). "IFF" is not incorrect here but for me is misplaced and
Given that it is unlikely the mis/over-use of IFF in the comments is a
meaningful problem I would vote for letting the imprecision go and avoid the
code churn. If the surrounding code was being altered anyway then having
the corresponding comment updated seems acceptable; but a blanket
find/replace doesn't seem helpful.
View this message in context:
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: