English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following is the context:

Despite my fastidious coding habits, I have made a silly mistake and typed += when I meant to type +. As a result, when concatUnsafe is called, it will modify the arguments out and s1, which may come as surprise to the user who would expect a concatenation function to modify one of the source strings?

const to the rescue.

share|improve this question
up vote 8 down vote accepted

"X to the rescue" is an idiom that means that X is coming to save us from a bad situation. It means that const will be the solution to the problem. Using this idiom is a more playful and informal way of saying this.

share|improve this answer
Thank you,english is something strange,so do other languages! It confused me for a long time! – Liu Sep 7 '10 at 1:17

It can be thought as omitting a couple of words:

const [is coming] to the rescue.

In other words, const will save you from making the programming mistake described in the text. (By the look of it, the author is talking about strings in C, which are indeed a potential minefield - so tread carefully!)

share|improve this answer
Thank you for your answer and your advice of c programming. – Liu Sep 7 '10 at 1:16
So += is how we concatenate strings in C? – delete Sep 7 '10 at 1:57
@Shinto: I was thinking that the function was computing the offset in the destination string at which to append the second source string, or something like that...but on reflection, I may just be digging a hole for myself... :-) – Steve Melnikoff Sep 7 '10 at 9:24
@Shint, @Steve: seems to be C++ and std::string. – Mr. Shiny and New 安宇 Sep 7 '10 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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