Disclaimer: this answer is extremely non-authoritative.

I think that, in Racket, the terms are used more or less interchangeably. The 
technical term is “procedure”, but as you point out, the term “function” is 
also used to mean the same thing. I don’t believe there is any distinction 
there that would be universally understood.

On the other hand, in How to Design Programs (and its various teaching 
languages), my understanding is that “function” is the correct term and 
“procedure” is strongly discouraged. The documentation on implementing new 
teachpacks supports this understanding, in a section entitled Prohibited Words 
<http://docs.racket-lang.org/htdp/index.html#(part._.Prohibited_.Words)>. It 
states explicitly that “function” should be used instead of “procedure”, 
“selector”, “constructor”, or any number of other terms. It includes the 
following justification:

> These guidelines use few terms intentionally, emphasizing commonality among 
> concepts rather than technical precision (which most students do not 
> appreciate anyway).

I imagine others on this list who wrote the above words can give a more 
authoritative answer should they find this one inadequate. :)

Alexis

> On Jan 13, 2019, at 11:37, Ellen Spertus <ellen.sper...@gmail.com> wrote:
> 
> Are "procedure" and "function" synonymous in Racket? It seems to be implied 
> by the documentation <https://docs.racket-lang.org/reference/index.html>. For 
> example, the documentation for compose 
> <https://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Fprivate%2Flist..rkt%29._compose%29%29>
>  describes it as a procedure that
> 
> [r]eturns a procedure that composes the given functions...The compose 
> function allows the given functions to consume and produce any number of 
> values...
> 
> (All of the above italicization was added by me.)
> 
> 
> 
> I understand that procedure? is a library procedure and function? is not. I 
> also understand the difference between a mathematical function and a computer 
> procedure (which might have side effects). What I'm trying to determine is 
> what language to use with my students this semester. (I like to use both 
> "procedure" and "function" because it's sometimes useful to have two 
> different words, as in the above documentation excerpt.)
> 
> 
> 
> FYI, I posted a version of this question to Stack Overflow 
> <https://stackoverflow.com/questions/54165329/are-procedure-and-function-synonymous-in-racket>.
>  I got an answer but was referred here.
> 
> 
> 
> Thanks.
> 
> 
> 
> Ellen
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com 
> <mailto:racket-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to