# Once And Only Once Name Paradox

(Originally on OnceAndOnlyOnce)'

Is OAOO a self-violating principle? Isn't OnlyOnce? sufficient? Why have the extra Once in the name?

I don't think it is a violation: "Only Once" is a necessary, but not sufficient, condition for "Exactly Once". -- DaveWhipp

I agree with DaveWhipp - it should be renamed ExactlyOnce.

But why do we need to cover the case of less than once? If it is possible to use something less than once then don't use it -- AsimJalis

That's the YouArentGonnaNeedIt principle. I agree with DaveWhipp, this is standard mathematical phrasing. If repeating a word is not allowed, then all sentences become a list of pointers to a thesaurus. Applying OAOO to a too small text makes for difficult reading. -- BobF.

JohnHortonConway coined the word onnce for OnceAndOnlyOnce, similar to the use of iff for if and only if.

• Maybe the principle should be renamed ExactlyOnce.
• Or JustOnce.

In standard English usage, "once", "exactly once", and "once and only once" all mean exactly the same thing. It is true, however, that mathematicians consider "once" to include the possibility of "twice", but frankly that always seemed insane to me, given that there's a really good standard English construction ("at least once") to cover this exact case. All that said, "Once and Only Once" is a better name for this principle than "Once" is, because "Once" isn't emphatic enough.

But "once" can mean "more than once". Take the perfectly valid sentence, "If it happened once, it could have happened again." Just as the surrounding context can tell you that an "if" really means "if and only if," so does the context tell you which sense of the word "once" is meant.
• I disagree with this example. The sense of the English sentence is more like, "If it happened exactly one time before, it could have happened a second time." Here once still means "exactly once" or "once and only once". The plurality of the idea comes from "again", while "once" implies singularity.
But then, we're all programmers here, so we shouldn't have to rely on anything as subject to interpretation as context. -- IanClelland

There's no paradox. Code may be speech, but it's not as expressive as human language. OAOO is a human term to describe a programming principle. Humans don't require the same precision in speech as code. As an example, when was the last time you said "exclusive or" in real conversation?

I said "xor" in a conversation (with a programmer friend of mine, but not about programming) a week ago, and I speak Hebrew! -- AmirLivne

I may be mis-remembering this but doesn't Latin have different words for or and xor. -- JamesKeogh

It's clear there is duplication. I think the name ExactlyOnce is more appropriate. -- DonWells

wow ... well stated, Don.

However, if we want to be very precise and literal, why not reduce it to "Once"? What added information does the adjective "Exactly" provide?
• Once doesn't imply "Once or less", it can mean "Once, more or less", e.g. "At least once", which isn't good.

Let's not overlook the lyric aspect; "once and only once" is a nice example of headless iambic trimeter. It flows nicely off the tongue.

I think the real paradox here is that this subject is being covered more than once. :) -JJ

Precisely. Seems to me that we need LessRedundancy.

• Word freq (each)
• Once 26
• the 21
• is 17
• a 15
• to 13
• that 10
• and 10
• of 8
• only 8
• 4 words 7
• in 6
• 6 words 5
• 2 words 4
• 15 words 3
• 39 words 2
• 157 words 1

For continuation, see PluralProblem? --DonaldNoyes
I think the biggest problem is the usual trait of programmers taking everything too literally. There is a time and a place for mathematical, literal precision. "Always" and "everywhere" are not them.

The comment that "Once and only once" is more aesthetically and idiomatically pleasing than "exactly once" is probably on the mark.

Like IfAndOnlyIf would make more sense if it were IfAndAlsoIf? ie a iff b is the same as a if b and b if a. But the former is convention

No paradox at all: Surely it is OnceAndOnlyOnce in the same way it is IfAndOnlyIf (iff)

-- JohnArrizza?

(and since I posted this clause in this page and in OnceAndOnlyOnce as well, this wiki is not conformant to OnceAndOnlyOnce.)
I always thought that OnceAndOnlyOnce was supposed to be a paradox, that that was the joke.
JohnArrizza?'s (reduplicated) comment is very similar to Mike G. Burton's comment on the aforementioned page. In the spirit of this discussion I state this reply once. The debate over the redundant and apparently self-conflicted term OnceAndOnlyOnce centers around the inclusivenss of options other than "exactly once". Doubt exists only because the term borrows a concept from mathematics IfAndOnlyIf (IFF) without really saying that it does. That issue should be put to rest, and then we can rest easy.

To illustrate, let's look at the language that distinguishes ivory-tower mathematicians from the masses. In mathematics IF doesn't exclude other ways of getting the same answer, whereas IFF absolutely does. In simple terms, Math is the search for Universal Truths on a purely parallel machine using all allowed inputs.
```	where mathematical IF is like if-endif, and
mathematical IFF is like if-then-else.
```
Many conditions on IFs can lead to the same result without a paradox.
``` S1	if X then Y=1 endif
S2	if W then Y=1 endif
```
The downside of IF is that you don't know how you got an answer of Y=1. But IFF is a complete statement of truth. No other condition leading to the same answer in the "then" part can exist, or else you have a paradox.
``` S1	if X then Y=1 else Y=(anything but 1) endif
S2	if W then Y=1 endif
```
S1 by itself is all you need to know that the machine saw input X when you have the result Y=1. But with both S1 and S2, what's the value of Y with input W? Remember, both statements run in parallel.

So, is it inclusive or exclusive? Does it work like IF or IFF? The name OnceAndOnlyOnce has a euphonious ring to it, so it's nice to keep, but we need a stronger definition directly stating that the mathematical concept IFF or onnce maps onto this name. Then all of this discussion can be refactored out as redundant, once and for all.

This is all cute, but as usual, NaturalLanguage rules. Once does not express the same idea as Exactly once, and in turn neither of these are exactly equivalent to OnceAndOnlyOnce.

• Do it once.
• Then do it twice.
• Now do it three times!

You see the difference? Do it once does not rule out subsequent, similar actions. That much is simple. Moreover, the word once is "overloaded", to sling some jargon around ("once upon a time", "once he had done so, everything fell into place", "I was once a toad", etc). So merely saying Once is not sufficient. But considering the other suggestion, exactly once, the denotation is correct but the connotation is totally different (I'm using the term "connotation" pretty broadly, I admit). If you write exactly once, it's technical, unemotional, mathematical, like writing x = 1. Once and only once on the other hand implies the intonation that exactly once would require in order to carry a similar meaning. Read it like this: "once...and ONLY once!!". This is like writing x == 1 ^ x != 2, 3, 4, ... only better because it makes skillful use of the English language and thus forms a great slogan. The emphasis is key, and emphasis IS a function, every bit as much as plus or minus.

So, no, there is no paradox here. = )

*Do it exactly once. *Then do it exactly twice. *Now do it exactly three times! Wait a second... I thought I said do it exactly once?!?

Captain Ramius: Re-verify our range to target... one ping only. Capt. Vasili Borodin: Captain, I - I - I just... Captain Ramius: Give me a ping, Vasili. One ping only, please. Capt. Vasili Borodin: Aye, Captain. -- from "The Hunt for Red October"