Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!aero-c!srt From: srt@aero.org (Scott "TCB" Turner) Newsgroups: comp.lang.lisp Subject: Re: Common Lisp, SOME, EVERY... Message-ID: <1991Feb26.213445.15460@aero.org> Date: 26 Feb 91 21:34:45 GMT References: <47946.27c2d8d3@ccvax.ucd.ie> <1991Feb22.210020.7319@aero.org> <4238@skye.ed.ac.uk> Sender: news@aero.org Organization: The Aerospace Corporation, El Segundo, CA Lines: 48 Once upon a time I wrote: >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. A number of people have responded to this with comments of the sort "C has immense numbers of functions in libraries, and people deal with that..." I don't think comparing Common Lisp's plethora of built-ins with library functions in other languages is completely relevant. For the most part, library functions are not general programming constructs. They perform specific computing tasks such as i/o, database retrieval, statistical manipulations and so on. There's no cognitive difficulty with that because there is still a one to small mapping from tasks to functions to accomplish those tasks. If I need to concatenate two strings in C, I can remember strcat[n]. C also has a one to small mapping for general programming constructs. For iteration, I can remember for/while. In Common Lisp, the mapping tends to be one to many. Even ignoring functions which do implicit iteration, there are roughly fifteen iteration constructs in Common Lisp. There are seven version of map! (And as Michael Pazzanni pointed out, one of the most useful map constructs isn't even represented.) That's neither necessary or desirable. Part of the problem seems to be lack of restraint on the part of the design committee. Opening the manual at random, I see "case" and "ccase", the difference being that "ccase" has no "otherwise" clause and signals an error on fall-through. Is it necessary or desirable to have two different functions for this? Why not have "case" signal an error if there is no "otherwise" and fall-through occurs? Looking at the language, it appears that every design conflict was resolved by adding both sides to the language. It looks like someone grepped all the functions out of five different AI programmers' code. Another part of the problem is lack of organization. While Steele's book tries to force a framework on Common Lisp, many functions simply fall through the cracks, or make poor fits. (This is aggravated by the inclusion of numerous seldom-used functions that don't truly deserve to be an integral part of the language. Does Common Lisp really need "prog2"? C'mon.) As several people have suggested, this could be improved by organizing Common Lisp into general programming constructs and specific libraries. -- Scott Turner