Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ncar!oddjob!uwvax!dogie!uwmcsd1!csd4.milw.wisc.edu!markh From: markh@csd4.milw.wisc.edu (Mark William Hopkins) Newsgroups: comp.lang.lisp Subject: Re: Functions vs. Procedures in Lisp Message-ID: <6024@uwmcsd1.UUCP> Date: 16 Jun 88 19:42:18 GMT References: <34296@linus.UUCP> <1350017@otter.hple.hp.com> Sender: daemon@uwmcsd1.UUCP Reply-To: markh@csd4.milw.wisc.edu (Mark William Hopkins) Organization: University of Wisconsin-Milwaukee Lines: 32 In article <1350017@otter.hple.hp.com> psa@otter.hple.hp.com (Patrick Arnold) writes: >John Gately is quite right to point out that function has sevral meanings >depending on the context of the conversation. I'm afraid it's one of my >"religious beliefs" that functions are expressions which denote values and >that calling a function with the same actual parameters will always produce >the same result and will have no insidious effects on other parts of the >system (i.e. side effects). After having seen countless examples of this kind of thing in Math texts: "Let g(x) = f(x, a)" or "We will suppress the subscripts in the following ..." or "A XXX space is a tuple , but we will denote such a space by U unless confusion precludes our doing so." I am more reluctant to believe that Mathematical functions do not have anything that corresponds to insiduous side-effects. Remember, a side-effect is just a function parameter (or returned value) that has not been explicitly parametrized in the definition of the function. This applies to I/O as well ... except that in most languages it would be impossible make the parameters explicit in function with I/O side-effects. Conclusion: Mathematical functions and programming language functions are MUCH more closely related than anybody has realised up to now. Sorta like: "I just found out yesterday that the Prince of Cambodia is my brother." -------------------------------------------------------------------------------- Disclaimer: the poster of this article bears no relation to Prince Sihanouk ... to the best of his knowledge.