I’ve always wondered why one calls a function as opposed to, for example, executing it.
A Google search for function call etymology
and similar terms turns up nothing useful, Wikipedia doesn’t mention it, online dictionaries have either no entry at all or no etymology section.
Where did the notion of ‘calling’ a function come from?
9
The word call goes back at least to Fortran, the first widely used programming language. In Fortran, CALL
is a keyword that passes control to a subroutine. It’s not clear why John Backus chose that word to invoke subroutines — you may need to read one or more biographies of Backus to discover that — but it seems likely that the use in Fortran is the reason that we use the word call today with respect to functions, methods, etc.
Note that the use of call with respect to functions and other subroutines also fits well with several English-language definitions of call:
- to make a brief visit
- to demand something
- to rouse from sleep
- to invite
11
1947:
In January 1947 John Mauchly presented general notes at ‘A Symposium of Large Scale Digital Calculating Machinery’ under the joint sponsorship of Harvard University and the Bureau of Ordnance, United States Navy.
…a coding instruction for placing the subroutines in the memory at places known to the machine, and in such a way that they may easily be called into use.”
https://en.wikipedia.org/wiki/Function_(computer_programming)#History
1