🚨 Putin is a war criminal. Russians are bombing hospitals. πŸ’”πŸ‡ΊπŸ‡¦

Pet peeve: "if and only if"

I find this to be highly annoying:

Is plain old “if” ambiguous? Is “if and only if” (abbreviated to “iff”) more powerful than a plain “if”?

Consider this statement:

Joonas is happy if he slept well and ate food

Translated to code:

if (sleptWell && ateFood) {
	happy = true
}

Why isn’t there an operator in programming languages for “iff” if “if” is not good enough? Can “if” randomly fail unless its more powerful cousin, the “iff” is used?

Does “iff” add more value? Do you consider this statement to be better:

Joonas is happy if and only if he slept well and ate food

To me using “iff” sounds like the writer wants to make him/herself sound smarter by using this academic sounding bullshit (just take a look at the academic jerking off on the Wikipedia page). But in reality I think that it only makes text more complex by adding this unnecessary noise.

We could make life simpler if and only if people weren’t trying to make it more complicated than it needs to be.


comments powered by Disqus