[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "procedure" vs. "function"
From: |
Paul Morris |
Subject: |
Re: "procedure" vs. "function" |
Date: |
Sat, 18 Apr 2015 12:57:17 -0400 |
> On Apr 18, 2015, at 11:21 AM, Urs Liska <address@hidden> wrote:
>
> So the choice of these names is actually an inconsistency in LilyPond's
> terminology?
>
> I'm asking this because I have just completed a tutorial about
> define-music-function and its siblings, and I realized that I used the terms
> function and procedure in an arbitrary mix.
>
> Now I think that I should follow the consistency of the Guile manual , use
> "procedure" everywhere in my text and point out the inconsistency in naming.
This terminology is something that I’ve wondered about. My speculation was
that the use of “function" in LilyPond’s define-music-function and friends
might be because they have type checking for their arguments, whereas scheme
procedures do not. That’s just speculation, but it’s also probably the most
relevant difference for a LilyPond user.
(Also I assume that define-music-function and friends were mostly intended for
internal use in LilyPond’s source code? So there’s that.)
Here’s wikipedia:
> In formal contexts such as Scheme standards, the word "procedure" is used in
> preference to "function" to refer to a lambda expression or primitive
> procedure. In normal usage the words "procedure" and "function" are used
> interchangeably.
https://en.wikipedia.org/wiki/Scheme_%28programming_language%29#Nomenclature_and_naming_conventions
So in your post I would say use “function” for these special cases of
define-music-function and friends and “procedure" for standard scheme
procedures. And maybe discuss the terminology, pointing out that these terms
are basically interchangeable for most intents and purposes.
-Paul
Re: "procedure" vs. "function", Michael Hendry, 2015/04/18
Re: "procedure" vs. "function", David Nalesnik, 2015/04/18
- Re: "procedure" vs. "function", Jacques Menu, 2015/04/18
- Re: "procedure" vs. "function", David Nalesnik, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18
- Re: "procedure" vs. "function", J Martin Rushton, 2015/04/18
- Re: "procedure" vs. "function", PMA, 2015/04/18