Re:Phrase origin: Why do we "call" functions?
by hexasquid on Wednesday July 09, 2025 @10:18PM
(#44516593)
I've never been quite sure when I'm applying data to a function, or applying a function to some data
[ Parent
| on HN ]
Re:Phrase origin: Why do we "call" functions?
by dotancohen on Wednesday July 09, 2025 @10:24PM
(#44516622)
Is the data changing or the function changing?
Re:Phrase origin: Why do we "call" functions?
by odo1242 on Wednesday July 09, 2025 @11:18PM
(#44516853)
In a functional language, neither
(though new data is created as a result of running the function, technically this is guaranteed to not affect the inputs due to the function having to be pure)
(perhaps this is excessively pedantic)
Re:Phrase origin: Why do we "call" functions?
by hexasquid on Thursday July 10, 2025 @12:43AM
(#44517264)
let's just map pedantic->precise and call it a day :)
Re:Phrase origin: Why do we "call" functions?
by dotancohen on Thursday July 10, 2025 @07:46AM
(#44519907)
When running the routine, is it typically the function that changes or the input data that changes?
If it's the same function running on different data, then you are applying the function to the data. If it's the same data running in a different function, then you are applying the data to the function.
Re:Phrase origin: Why do we "call" functions?
by linguae on Thursday July 10, 2025 @01:34AM
(#44517605)
This tripped me up last week when I was reading Futamura’s paper on partial evaluation (i .e., Futamura projections). I’m not used to the “apply” terminology for functions, even though I learned the lambda calculus in grad school over a decade ago.
Re:Phrase origin: Why do we "call" functions?
by reverendsteveii on Thursday July 10, 2025 @10:05AM
(#44521261)
to my mind the function has always been the definition of the process and the data what that process, well, applies to. so you apply the function to the data and get an output.