Pergunta

Where does the phrase "overload" come from?

It's interesting to see the translation of the term in different languages (e.g. list of Wikipedia articles about overloading), some languages translate it directly (in the meaning of "to put too much weight on something"), but some languages don't translate it at all.

Foi útil?

Solução

This doesn’t answer the question definitively, but the earliest use of it I can find is by John McCarthy in 1966. As described by John Peck, recalling several years later one of the discussions about the Algol standard in Warsaw: “What I can remember of that meeting was the insistence of John McCarthy, that any new language should have what he called overloading of operators. This would eventually became the operation declarations of ALGOL 68.” So the term caught on because of John McCarthy. Or at least it was so obscure in 1966 that McCarthy needed to explain it to the other leading language designers in the world and his usage stood out to the other participants as remarkable. Unfortunately, he passed away in 2011 and I can’t find anything online where he talked about why he called it that, if he coined the term himself, or if there’s any story behind it.

As a commenter informed me, Bjarne Stroustrup explicitly says that he took the idea from Algol when he designed C++ in the early ’80s. A Google Ngram search shows that the phrases “operator overloading” and “overloaded operators” were virtually unheard-of before the ’80s. It doesn’t seem to be how mathematicians back then talked about the way the + sign could denote any group operation.

Jules in the comments gives a plausible source for McCarthy’s use of the term: linguists had been referring to the double meanings of words as “semantic overloading” for decades before 1966. McCarthy’s papers show he was familiar with the field and its terminology. (He also once wrote, “The squabbles among linguists remind me of a saying of my mother-in-law, a retired farmer’s wife. ‘When the chickens start cannibalizing one another, the only thing to do is to butcher the lot or sell them to someone else and start over.’”)

Licenciado em: CC-BY-SA com atribuição
scroll top