From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?
Date: Wed, 25 Jun 2014 11:37:14 -0400 [thread overview]
Message-ID: <barmar-A65A65.11371425062014@news.eternal-september.org> (raw)
In-Reply-To: wfkeionpthgo.fsf@sap.com
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 ***
next prev parent reply other threads:[~2014-06-25 15:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 17:13 Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp? Nicolas Petton
2014-06-17 17:28 ` Stefan Monnier
2014-06-17 18:36 ` Nicolas Petton
2014-06-17 18:56 ` Doug Lewan
2014-06-17 19:06 ` Nicolas Petton
2014-06-17 19:55 ` Doug Lewan
2014-06-17 22:16 ` Stefan Monnier
2014-06-18 11:00 ` Nicolas Petton
[not found] ` <mailman.3879.1403089222.1147.help-gnu-emacs@gnu.org>
2014-06-18 14:36 ` Stefan Monnier
2014-06-18 14:43 ` Barry Margolin
2014-06-18 15:43 ` Damien Cassou
2014-06-18 16:31 ` Phillip Lord
[not found] ` <mailman.3896.1403106263.1147.help-gnu-emacs@gnu.org>
2014-06-24 13:51 ` Christoph Wedler
2014-06-24 16:24 ` Barry Margolin
2014-06-25 3:22 ` Stefan Monnier
2014-06-25 4:08 ` Leo Liu
[not found] ` <mailman.4252.1403669342.1147.help-gnu-emacs@gnu.org>
2014-06-25 13:46 ` Stefan Monnier
[not found] ` <mailman.4251.1403666567.1147.help-gnu-emacs@gnu.org>
2014-06-25 10:24 ` Christoph Wedler
2014-06-25 13:35 ` Stefan Monnier
2014-06-25 14:09 ` Stefan Monnier
2014-06-25 15:37 ` Barry Margolin [this message]
2014-06-25 23:44 ` Robert Thorpe
2014-06-18 14:43 ` Pascal J. Bourguignon
[not found] ` <mailman.3837.1403026153.1147.help-gnu-emacs@gnu.org>
2014-06-20 0:20 ` WJ
2014-06-20 13:45 ` Stefan Monnier
[not found] <mailman.3836.1403025251.1147.help-gnu-emacs@gnu.org>
2014-06-17 21:42 ` Barry Margolin
[not found] <mailman.4322.1403739913.1147.help-gnu-emacs@gnu.org>
2014-06-26 0:37 ` Stefan Monnier
2014-06-26 5:27 ` Barry Margolin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-A65A65.11371425062014@news.eternal-september.org \
--to=barmar@alum.mit.edu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).