Path: utzoo!utgpu!watserv1!watmath!iuvax!mailrus!hellgate.utah.edu!defun.utah.edu!sandra From: sandra%defun.utah.edu@cs.utah.edu (Sandra J Loosemore) Newsgroups: comp.lang.lisp Subject: Re: FUNCALL question Message-ID: <1990Feb1.212652.10062@hellgate.utah.edu> Date: 2 Feb 90 04:26:52 GMT References: <3277@accuvax.nwu.edu> <1990Jan28.175437.19293@hellgate.utah.edu> <1666@skye.ed.ac.uk> <387@forsight.Jpl.Nasa.Gov> Organization: PASS Research Group Lines: 41 In article <387@forsight.Jpl.Nasa.Gov> gat@robotics.Jpl.Nasa.Gov (Erann Gat) writes: >Nevertheless, I stand by the >assertion that identifiers in Common Lisp, be they local or global, >have two bindings, a value binding and a function binding, Agreed, but they actually have more than two bindings. They can also have type bindings, documentation-type bindings, declaration bindings, and so on. >and that >this is the reason for the existence of an explicit FUNCALL function, >that is, to enable one to call a function stored in an identifier's >value slot. No, the reason for the existence of the FUNCALL function is that in Common Lisp syntax, the CAR of a list follows different evaluation rules than subforms in the CDR. What FUNCALL buys you is the ability to obtain the function to be called by evaluating something with the CDR evaluation rules instead of the CAR evaluation rules. Although it's hard to imagine why one would want to do such a thing, you could certainly have a two-namespace Lisp that uses the same evaluation rules in both CAR and CDR, and no explicit FUNCALL operation. You would just have to use #' as the CAR of every function call form instead of just so that you refer to the functional binding of the name instead of its variable binding, as in (#'list 'a 'b 'c) One can also imagine a single-namespace Lisp that has different evaluation rules for the CAR than the CDR, that would require an explicit FUNCALL operator. The issues of syntax and namespaces are actually orthogonal. >I also reaffirm my position that multiple bindings cause a great deal of >confusion! I don't think anybody has been seriously taking issue with this. I'm not too bothered by multiple namespaces in practice, but I agree that a single namespace is less complicated. -Sandra Loosemore (sandra@cs.utah.edu)