Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!netnews.upenn.edu!vax1.cc.lehigh.edu!vlsi3b15!lehi3b15!jearly From: jearly@lehi3b15.csee.Lehigh.EDU (John Early) Newsgroups: comp.lang.lisp Subject: Re: Dumb Common Lisp question Message-ID: <1005@lehi3b15.csee.Lehigh.EDU> Date: 3 Jul 90 21:27:10 GMT References: <4204@jato.Jpl.Nasa.Gov> <1990Jun29.162248.7846@Neon.Stanford.EDU> Distribution: usa Organization: CSEE Dept. Lehigh University, Bethlehem, PA Lines: 31 In-reply-to: max@Neon.Stanford.EDU's message of 29 Jun 90 16:22:48 GMT In article <1990Jun29.162248.7846@Neon.Stanford.EDU> max@Neon.Stanford.EDU (Max Hailperin) writes: In article <4204@jato.Jpl.Nasa.Gov> brian@granite.Jpl.Nasa.Gov (Brian of ASTD-CP) writes: >[...] I have one pressing question about CL. What is the rationale >behind the (function ...) or #' construct? [...] >I'm most familiar with Scheme/T, where this kind of thing is >not necessary. All symbols are evaluated the same way [...] >Treating a function as just another data type >like integer or string seems very neat and clean. There must >be some reason it's not done this way in CL. It's done this way for the sake of people who like to call an argument that's a list "list" and still be able to use the "list" function, as in (defun foo (list) "Return a list of the sum of the list and the sum-of-squares of the list." (list (apply #'+ list) (apply #'+ (mapcar #'square list)))) instead of having to call it the-list like you would in scheme. [Of course, this applies to other names as well, list is just a common one.] Since this is bad programming (at best) I suspect that that is not the reason. I would guess that there is instead an historical/compatibility reason. John. ---------------------------------------- John Early | jearly@lehi3b15.csee.lehigh.edu | I was just a child then; JPE1@Lehigh.Bitnet | now I'm only a man. [pf] LUJPE@VAX1.cc.lehigh.edu |