Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: FUNCALL question Message-ID: <1666@skye.ed.ac.uk> Date: 1 Feb 90 20:26:43 GMT References: <3277@accuvax.nwu.edu> <1990Jan28.175437.19293@hellgate.utah.edu> <1655@skye.ed.ac.uk> <386@forsight.Jpl.Nasa.Gov> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 47 In article <386@forsight.Jpl.Nasa.Gov> gat@robotics.Jpl.Nasa.Gov (Erann Gat) writes: >In article <1655@skye.ed.ac.uk>, jeff@aiai.ed.ac.uk (Jeff Dalton) writes: >> Indeed, an identifier can be associated with two values at once, >> one when it's interpreted as a function name, the other when it's >> interpreted as a variable. Erann Gat made the mistake of calling >> these two interpretations the symbol-function and symbol-value >> when those terms are properly applied only to symbols (acting >> as global variables and function names). Local variables and >> function names don't have symbol-values or symbol-functions in >> that sense. >I want to thank Jeff Dalton for coming to my defense. However, the >above is totally incorrect (said with a smile). Temporary variables >do have value and function bindings. That is why there are LET and >FLET forms in CL. For example: No, you have it wrong -- this time. But it's because I failed to make some things clear. I tried to be careful to say "identifier" when I was talking about a name in a program and "variable" and "function name" for the two possible interpretations of identifiers (possible in the contexts we were interested in, that is). In this terminology, a _variable_ doesn't have both a function and value binding, but a single name might have both, in a sense, because it's being used as both a variable and a function name. We could shift terminology, however, and say that a variable can have both a value and a function binding (as you say above). I wasn't trying to disagree with you there. However, once you say "symbol-value" and "symbol-function" people may well assume you're talking about _symbols_ (the data objects) and the associated values obtained by the Common Lisp functions SYMBOL-VALUE and SYMBOL-FUNCTION. Indeed, I thought people were reading you that way. The problem with talking this way is that local variables might not be associated with symbols at all -- after compilation, for example. And, in any case, the functions SYMBOL-VALUE and SYMBOL-FUNCTION can't look at local variables. Anyway, that's the "sense" I had in mind when I wrote "local variables and function names don't have symbol-values or symbol-functions in that sense." -- Jeff