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?
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 '20 at 15:56