17769, "bradcray", "Should the language specification use a term other than 'function'?", "2021-05-18T15:50:32Z"
Currently, the language specification uses the term function to refer to the union of procedures and iterators. At times, when giving talks, this has caused cognitive dissonance from audience members who feel that the use of the term 'function' here is a mismatch w.r.t. what 'function' means in mathematics and/or in functional languages. This has made me wonder, for some time now, whether we should change the term to something else.
My favorite alternative is subroutine, which seems to me to better capture the general notion of "here's a chunk of code that you can call into, which takes any number of input and output arguments, can do pretty much anything, and will (probably) eventually return" than 'function' does, particularly for iterators. Conversationally, I might refer to these as routines for short.