In computer science, I have often come across the expression to back out meaning to say that a function is returned from before performing its actual task, as in this imaginary code comment:

double divide(double dividend, double divisor) {
  if (divisor == 0) {
    return 0; //divisor is zero => back out early
  return (dividend / divisor);

Now I recently came across the expression to bail out in just the very same context. I know that to bail somebody out generally means to provide funds to get someone out of a difficult financial situation, so I was wondering if the writer confused to back out and to bail out or if to bail out really has this meaning, too.

  • 2
    I'm voting to close as this specialised jargon (or even malapropism) is a more suitable fit on Computer Science.SE. Mar 8, 2020 at 14:42
  • 2
    CS people will tell me off arguing this is a linguistic question.
    – user805623
    Mar 8, 2020 at 15:21
  • Then why do they have a 'terminology' tag? Legalese, Ecclesiese, most computerese ... are off-topic on ELU, which looks at standard usage. Mar 8, 2020 at 15:31
  • How do I close this?
    – user805623
    Mar 8, 2020 at 17:58
  • 1
    @WS2 If OP merely wants to know the usual meanings of 'bail out', a quick look in any dictionary will give the answer, so the correct procedure is to CV as lacking reasonable research, not answer. I gave OP the benefit of the doubt' and Hot Licks' 'throw an exception' claim seems to endorse this. A computing usage, wouldn't you now agree? Mar 9, 2020 at 12:05

2 Answers 2


OP: "I know that to bail somebody out generally means to provide funds to get someone out of a difficult financial situation"

Bail out also means to quit something:
"The actor has bailed out of the film after only three weeks' shooting." - Cambridge Dictionary

The phrase is also often used with the specific meaning of leaving a crashing plane via parachute:
"The pilot barely had time to bail out" - also Cambridge Dictionary.

I'd suggest that the use of the phrase in a coding situation is along these lines.

  • But 'I'd suggest' ... answers are not what ELU is about. Mar 8, 2020 at 19:28
  • Quite so. I think the parachute meaning is the relevant one here. I've looked in the OED, and as well as all the different financial, and legal senses of "bailing out banks" the one that is equivalent to "back-out" is this one. Aeronautics. An emergency parachute jump.1955 Sci. News Let. 8 Jan. 23 The purpose..was to explore human tolerances during a high speed bailout from jet planes.
    – WS2
    Mar 8, 2020 at 20:40
  • "Bail out" (in the parachute sense) == exception (in the programming sense).
    – Hot Licks
    Mar 8, 2020 at 21:25
  • 1
    @JohnGo-Soco -- I suppose you've got me there ... I was only a programmer for about 45 years.
    – Hot Licks
    Mar 9, 2020 at 12:36
  • 1
    Fair enough. On the second, I completely agree with HotLicks that bail out is a sensible phrase to use for an early exit (either as the result of an exception or because a condition was fulfilled early). As an aside I'd note that I wouldn't use "back out" for that purpose as it has the alternate computerese meaning of undoing something, e.g. "the new code crashed so I backed out the changes". Mar 9, 2020 at 20:05

In computing, "to bail out" is "to exit early", for any reason, such as in your example. "To back out" generally has the meaning "to undo" changes, think ROLLBACK in SQL. ROLLBACK undoes and discards all current changes that have not yet been permanently committed (saved) to the database, returning it to its previous (stable) state.

Backing out should leave the program in a clean state, bailing out can leave the program in either a clean or an unstable state. Backing out is normally done carefully, bailing out is normally done quickly. For example, it might be desirable to restore the value of a changed variable on an error. Backing out will take care to do so, bailing out will exit as quickly as possible, potentially leaving a bad or invalid value in the variable.

Think of a plane on fire as a function about to crash the program. The program survives by bailing out with a parachute, but the function goes down in flames with the plane. (Actually, the function's run time and memory would be cleaned up and made inaccessible, equivalent to the plane being erased from existence before it has the chance to crash.)

Unfortunately, I can't find even bad references for either of these computing meanings, only blogs and the like showing them being used. If you'll forgive the original research:

A Taste of Recursion

By Dan Gookin

For recursion to work, the function must have a bailout condition, just like a loop. Therefore, either the value passed to the recursive function or its return value must be tested. Here’s a better example of a recursive function:

void recursion(int x)

The recursion() function accepts the value x. If x is equal to zero, the function bails. Otherwise, the function is called again, but the value of x is reduced. The decrement prefix operator is used so that the value of x is reduced before the call is made.

(emphasis mine)

The meanings are very close to the standard English meanings:

bail out

  • to jump out of an aircraft with a parachute because the aircraft is going to have an accident
  • to stop doing or being involved with something

back out

  • to decide not to do something that you had said you would do
  • to refuse to do something you earlier had agreed to do

In my mind, they mean different but similar things in computing too. I could be wrong about their meanings not being interchangeable. Perhaps "to back out" of a function is acceptable technical English. If one of my colleagues wrote one where I thought they meant the other, I would certainly ask them to clarify it since clarity is one of the most important things in computing. However, others may differ from my viewpoint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.