Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!jarthur!ucivax!pazzani From: pazzani@pan.ics.uci.edu (Michael Pazzani) Newsgroups: comp.lang.lisp Subject: Re: Common Lisp, SOME, EVERY... Message-ID: <27C5ACA5.12887@ics.uci.edu> Date: 22 Feb 91 23:43:33 GMT References: <1991Feb15.065508.28609@cs.columbia.edu> <47946.27c2d8d3@ccvax.ucd.ie> <1991Feb22.210020.7319@aero.org> Reply-To: pazzani@ics.uci.edu (Michael Pazzani) Organization: UC Irvine Department of ICS Lines: 46 Nntp-Posting-Host: pan.ics.uci.edu In article <1991Feb22.210020.7319@aero.org> srt@aero.org (Scott Turner) writes: >EVERY, SOME, etc., are exactly the kind of "kitchen sink" functions >that I object to in Common Lisp. They provide no additional >functionality to the language, are semantically confusing, and make >reading code difficult. > >A language that has a 1000 built-in functions (constructs) is doomed. >People don't have the cognitive mechanisms to deal with that number >and variety of mechanisms. The result is that each person uses their >own personal subset of the language, and a Tower of Babel results. >Far from being "common", Common Lisp is doomed to be uncommon. > > -- Scott Turner I have to disagree with this particular example, (perhaps because some and every are part of my working set). Sure, you can write equivalent code in terms of do, or recursion. But there are common patterns of usage of do* and recursion, that are worth having around so they don't need to be re-invented from primitives each time. This makes writing and reading code much easier for me. I'd much rather see and write (some #'(lambda(op)(solved? (apply-op op state))) operators) than the equivalent with do, recursion, (or mapc with a return-from). Indeed, there are some common patterns have been left out, that I define as macros and use extensively. For example, applying a function to each element of a list and consing together the non-nil values. (delete nil (mapcar #'fn list)) and (let ((v)) (mapcan #'(lambda(x)(when (setq v (fn x)) (list v))) list)) are less clear to me than (all-images #'fn list) Furthermore, all-images can be optimized once for this particular purpose. Mike