I'm designing some programming code, and the language is an important piece of making it easy for readers of the design to understand the context and intent of the code.

In particular, I'm looking for a negative complement to the word when in the context below.

When

Reading the code in the positive with "when", it would be interpreted along the lines of the following:

"when" condition -> wait until the condition becomes true/is satisfied then do something

e.g.

"when" true -> do something

"when" false -> wait

The word "when" describes to the reader both the waiting and conditional triggering (once) of an action upon a condition being met.

When negative

The complement is a mystery word/portmanteau "X", ought to describe the same but with the conditional logically inverted:

"X" true -> wait

"X" false -> do something

Options

Here are some possible options for what X might be, for thought:

  • whenNot
  • whenNoLonger
  • untilNot

Example

So for an example, suppose there's a condition "temperature", that's either hot or cold, and we want to trigger when it is not cold, here's my best thought on how they'd be roughly written/interpreted to/from English:

The temperature, "whenNot" cold, we do something
The temperature, "whenNoLonger" cold, we do something
The temperature, "untilNot" cold, we do something

The one that strikes me as the most appropriate innate description is whenNoLonger, but a simpler, shorter alternative would be ideal.

Do any good succinct alternatives come to mind?

Edit Adding on the helpful comments I've garnered some ideas.

One option may be heretofore or hitherto, adverbs meaning essentially "before this time; until now." So "the temperature, before this time cold, we now do something". It's old englishy but otherwise seems apt.

One might also use thus far but there's no guarantee that the condition of "not cold" is not immediately met (i.e. "thus far" presumes or might indicate a history of state, that may not actually be known)


A common word for when not is unless.

unless conjunction Except if (used to introduce the case in which a statement being made is not true or valid) ‘unless you have a photographic memory, repetition is vital’ - ODO

The phrase "when X (is true), do Y" says to do Y when X holds. For example, "when it rains, use an umbrella" says to use an umbrella when it rains.

The phrase "unless X (is true), do Y" says to do Y when X doesn't hold. The parallel example, "unless it rains, use an umbrella" says to use an umbrella when it's not raining.

Note that if you're looking for the rule to execute upon the termination of a condition, as opposed to just the negation of the condition, use @Dan Bron's suggestion: after.


The commonly used alternative for this is while, with an empty body, meaning that while some condition is true, you just keep re-evaluation that condition. How you phrase the condition is entirely up to you - it's usually considered a good idea to not use negative condition- or boolean-names, so "ItsTooCold" would often be preferred to "ItsNotYetWarmeEnough". Think of negating that last one: if (NOT ItsNotYetWarmEnough).

while (ItIsTooCold); // <-- this line keeps repeating until "ItsTooCold" returns false.

//Do whatever you want to do when the temperature is high enough.