[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "procedure" vs. "function"
From: |
Michael Hendry |
Subject: |
Re: "procedure" vs. "function" |
Date: |
Sat, 18 Apr 2015 12:55:22 +0100 |
> On 18 Apr 2015, at 11:15, Richard Shann <address@hidden> wrote:
>
> On Sat, 2015-04-18 at 11:51 +0200, Urs Liska wrote:
>> Hi all,
>>
>> I just stumbled over a terminology issue: are "procedure" and "function"
>> synonyms in Scheme or do they refer to different things?
> The Guile reference manual uses the term procedure
>>
>> From my earliest experiences with programming I'd recall the difference
>> to be that functions return a value and procedures don't.
>
> that was a common terminological distinction for some programming
> languages at one time apparently.
I think it was Pascal that introduced a distinction between a Procedure (which
does something without returning a value) and a Function (which does something
AND returns a value).
In C there are only Functions, but in many instances the returned value isn’t
of any interest and is ignored, so they’re Procedures in all but name.
If forced to choose, I like the Pascal way - it makes it quite clear that you
intend no value to be returned by a Procedure, and that if you write a Function
you really do want a result.
Horses for courses, I suppose!
Michael
>
> Richard
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: "procedure" vs. "function",
Michael Hendry <=
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
- Re: "procedure" vs. "function", J Martin Rushton, 2015/04/18