help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?


From: Barry Margolin
Subject: Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?
Date: Wed, 25 Jun 2014 11:37:14 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <wfkeionpthgo.fsf@sap.com>,
 Christoph Wedler <christoph.wedler@sap.com> wrote:

> >> (8) I don't mind if a very complex and heavyweight function takes keyword
> >> arguments.  What bothers me is making simple basic functions such as
> >> "member" use them.
...
> What is wrong with the keyword parameters :test, :test-not and :key of
> cl-member (should be `member' ;-)) - which position do you want to give
> them - or do you want to invent extra function names for them?

I believe what RMS was saying is that they shouldn't have all those 
options at all -- they're no longer "simple basic functions". Yes, we do 
invent extra function names for them. Elisp (like Maclisp before it) has 
member and memq, while CL has a single function MEMBER with a :TEST 
option (and to make things worse, the default test is not the same as 
the Maclisp MEMBER function, it's more like MEMQ).

Note that CL isn't totally consistent about this. There are a number of 
functions that come in destructive and non-destructive versions (e.g. 
NCONC and APPEND), rather than a single function with a :DESTRUCTIVE 
option. In the case of APPEND/NCONC, this is necessary because they take 
all the arguments as a single &REST list, so there's no place to put 
options.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]