1
$\begingroup$

In a CS context, 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.

Has any one ever heard or read a native speaker of English say or write to bail out of a function? Or, if you're a native speaker, would you say to bail out is also correct here?

$\endgroup$
  • 1
    $\begingroup$ This is more about programming, not Computer Science and even more about English language usage.. Below excerpt "The most abrupt way to bail out is by calling the Standard C abort function, as in:" if (something really bad happened) abort(); You can also check at Stack Overflow by searching for "bail out", for example: stackoverflow.com/questions/8311723/… or docs.python.org/3/c-api/intro.html $\endgroup$ – Evil Mar 8 at 19:04
  • 1
    $\begingroup$ Yes, “bail out” is correct here. Check a dictionary. It can be transitive or intransitive. When it's intransitive, it can mean “to get oneself out of a difficult situation”. $\endgroup$ – Gilles 'SO- stop being evil' Mar 8 at 20:35
  • $\begingroup$ That's a slightly different usage of bail. For this one, see the examples under "phrasal verbs" section 1.1 in lexico.com/en/definition/bail#h70131995116240: "discontinue an activity" $\endgroup$ – rici Mar 12 at 15:56
1
$\begingroup$

I understand "to bail out" as to give up permanently; "to back out" is to give up some track, possibly to try something else.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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