Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!cs.utexas.edu!rice!titan!dorai From: dorai@titan.rice.edu (Dorai Sitaram) Newsgroups: comp.lang.lisp Subject: Re: FUNCALL question Message-ID: <4541@brazos.Rice.edu> Date: 4 Feb 90 23:49:32 GMT References: <3277@accuvax.nwu.edu> <1990Jan28.175437.19293@hellgate.utah.edu> <1990Jan29.224305.20803@hellgate.utah.edu> <385@forsight.Jpl.Nasa.Gov> <1654@skye.ed.ac.uk> Sender: root@rice.edu Organization: Rice University, Houston Lines: 47 In article <1654@skye.ed.ac.uk> jeff@aiai.UUCP (Jeff Dalton) writes: $In article <385@forsight.Jpl.Nasa.Gov> gat@robotics.Jpl.Nasa.Gov (Erann Gat) writes: $>In article <1990Jan29.224305.20803@hellgate.utah.edu>, sandra%defun.utah.edu@cs. $>utah.edu (Sandra J Loosemore) writes: $>> Scheme has a FUNCALL operation with exactly the same *semantics* as $>> that in Common Lisp. It does, however, have different syntax, which $>> most people would probably agree is less complicated. $ $I'm not sure it's fair to say FUNCALL is just syntax, because FUNCALL $is not restricted to appearing as the car of a function call. FUNCALL ^^^^^^^ $is a function, and Scheme does not have such a function. Since the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $original quesiton was "why is FUNCALL a function?", this is a relevant, $although minor, point. $ $I think it's true that most people now prefer the Scheme approach; but $it depends, in part, on what sort of code is involved. When a lot of $FUNCALLs are needed, they can make code look cluttered and hard to $read. But when they're rare, they can act as a useful sign that $something unusual is happening. $ $>Scheme has a FUNCALL only insofar as its semantics for calling functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $>are the same as the semantics of funcall. Scheme does not have a ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $>function which does what FUNCALL does. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $ $I agree (see above). I saw the above rather by accident, so what I say here might take something out of context. Disclaimer done, I don't see how someone can claim that Scheme doesn't have a _funcall_ function (procedure). Surely you don't just mean that the language standard doesn't mention _funcall_? For _funcall_ is easily retrieved as: (define funcall (lambda (f . z) (apply f z))) So what am I missing? --dorai -- ------------------------------------------------------------------------------- It may be that the gulfs will wash us down; It may be we shall touch the Happy Isles. -------------------------------------------------------------------------------