lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "procedure" vs. "function"


From: Andrew Bernard
Subject: Re: "procedure" vs. "function"
Date: Sun, 19 Apr 2015 18:35:08 +1000

Well if you consult the bible Structure and Interpretation of Computer Programs by Abelson, Sussman, and Sussman, the term function is strictly reserved for mathematical objects, and procedure is uniformly used for what people loosely call functions.

As to the discussion about the distinction between procedure and function in other languages, from a pure functional programming viewpoint a procedure in Pascal and so on is called purely for its side effects, on global variables (horror!) for example,  which is why it does not return a value, and this is a complete abomination. Of course Scheme is a functional language but not pure like Haskell, so this is academic in the context of lilypond. Still preferable to avoid procedures that are invoked purely for side effects whether your language is pure or impure.

So the guile manual is correct to uniformly use the term procedure. But if you look at the Racket manual they consistently use the term Functions (Procedures) in headings, so they are somewhat looser.

In short, procedure and function are most certainly not synonyms in Scheme terminology.

Andrew


reply via email to

[Prev in Thread] Current Thread [Next in Thread]