Phrase origin: Why do we "call" functions?
Terminology around “call” and function use
- Commenters contrast “call” with “invoke”, “execute”, “apply”, “perform”, “activate”, etc. Some feel “invoke” sounds more formal or magical; “call” remains the default phrase even when people say “function invocation”.
- Several find ESL and novice misuses grating: “calling a command”, “calling a button”, or “calling the return keyword”. Others note beginners also overuse “command” for any statement or construct.
- There’s discussion of whether “statement” is a good word at all; some argue “command” or “order” historically fit imperative languages better than “statement”, which in ordinary language implies truth values.
Control flow as functions vs syntax
- Long subthread on whether
ifis or should be a function:- In eager imperative languages, an
iffunction would evaluate both branches, causing side effects and inefficiency. - Lazy or macro-based languages (Haskell, Lisp/Scheme, Smalltalk, Excel, lambda calculus) can make
ifa function or special form, but most still treat it as syntax for optimization and diagnostics.
- In eager imperative languages, an
- Distinction is drawn between
ifexpressions vsiffunctions, and between arguments (passed to functions) and general expressions in language grammars.
History: subroutines, libraries, and CALL
- Several comments expand on the article’s history: early documents spoke of “calling in” subroutines, “initiating subroutines”, and linking from a “library” of tapes or paper strips.
- “Call number” from library science and library-style subroutine collections are seen as strong influences; Grace Hopper is cited as tying this to the word “compiler”.
- Others note hardware/assembly aspects: different machines had CALL-like instructions or “branch and link” variants; opinion is that the instruction names mostly followed language terminology, not vice versa.
Exceptions, loops, and other verbs
- Discussion of “throw” vs “catch” vs “raise” exceptions: possible roots in earlier hardware “exceptions”, signals/flags, or simply choosing words that avoided C identifier clashes.
- For loops: “for” is linked to “for each” and mathematical phrasing (“for every integer i…”). History through ALGOL, BASIC, FORTRAN’s
DOis mentioned.
Cross-linguistic and metaphor variations
- Multiple languages translate “call” closer to “summon”, “invite”, or “call up”; people enjoy the “summoning” / wizardry metaphor.
- Other gaming/programming slang appears: “proc” from “procedure”, and everyday expressions like “jump on a call”.
Meta / safety
- One commenter flags serious criminal allegations about the blog’s author and links an external writeup, implicitly questioning platforming their work.