lilypond-user
[Top][All Lists]
Advanced

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

Re: "procedure" vs. "function"


From: PMA
Subject: Re: "procedure" vs. "function"
Date: Sat, 18 Apr 2015 15:41:47 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101227 Iceape/2.0.11

PMA wrote:
Jacques Menu wrote:
Hello,

Yes, historically a disctinction was made between the « sub-programs »
that return a value and those that don’t, but the Scheme docs seem to
use the terms function and procedure interchangeably.

In C++, everything is a function : a procedure is merely a function
that returns a value of the « void » type, i.e. no value.

JM

Le 18 avr. 2015 à 18:33, David Nalesnik<address@hidden> a
écrit :



On Sat, Apr 18, 2015 at 4:51 AM, Urs
Liska<address@hidden<mailto:address@hidden>> wrote:
Hi all,

I just stumbled over a terminology issue: are "procedure" and
"function" synonyms in Scheme or do they refer to different things?

From my earliest experiences with programming I'd recall the
difference to be that functions return a value and procedures don't.
But that's clearly not the case in Scheme.

Any enlightenment available?

Well, I'm guilty of using them interchangeably...

Anyway, maybe the following will help -- or add to the confusion :)

http://stackoverflow.com/questions/721090/what-is-the-difference-between-a-function-and-a-procedure<http://stackoverflow.com/questions/721090/what-is-the-difference-between-a-function-and-a-procedure>


DN

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
Hi List --

AFAIK, of our major ancestor languages, only Pascal insisted on a
literal working
function-vs-procedure distinction. Did Wirth ever defend this insistence
(as more
than a track-keeping enforcer re value-outputting vs
non-value-outputting code)?

PMA
P.S.  Did he intend a "function" to embody purely a single mathematical
function (one too fussy to be a command primitive), or were the innards
to be open to other code as well?  And if the latter, did he consider that
a growing incorporation of such code might well smush the boundaries
of his original func-vs-proc distinction (which, clearly, hasn't caught on)?

PMA



reply via email to

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