Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdahl!pacbell!att!alberta!ubc-cs!faculty.cs.ubc.ca!manis From: manis@faculty.cs.ubc.ca (Vincent Manis) Newsgroups: comp.lang.lisp Subject: Re: Functions vs. Procedures in Lisp Message-ID: <3205@ubc-cs.UUCP> Date: 15 Jun 88 19:56:32 GMT References: <499@sequent.cs.qmc.ac.uk> <1350016@otter.hple.hp.com> <34296@linus.UUCP> Sender: nobody@ubc-cs.UUCP Reply-To: manis@faculty.cs.ubc.ca (Vincent Manis) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Lines: 23 I first heard the term ``function'' in high-school algebra, to describe a particular type of relationship between quantities. In university mathematics, we spent a lot of time talking about mappings, bijective and otherwise. None of these ideas have anything to do with the programming concept of a ``function'', which returns a value after perhaps assigning some variables or doing some I/O. Languages with state change operators (such as assignment, data structure mutation [rplaca/set-car!], or I/O) do not have functions in the mathematical sense. We've all been sloppy in the past, and talked as if they did. The authors of the Scheme report did us all a service in eschewing ``function'', and using ``procedure'' instead. Procedures are ``first-class citizens'' of a language if they may be passed as parameters, returned as procedure values, and stored in data structures. CL, Scheme and most purely functional languages extend these rights; C, and Modula-2 extend all these rights with limits (they don't allow such procedures to encapsulate anything except the static global environment). Vincent Manis | manis@cs.ubc.ca The Invisible City of Kitezh | manis@cs.ubc.cdn Department of Computer Science | manis@ubc.csnet University of British Columbia | uunet!ubc-cs!manis <> |