From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp? Date: Wed, 25 Jun 2014 09:35:15 -0400 Organization: A noiseless patient Spider Message-ID: References: <87d2e78nn7.fsf@gmail.com> <87bntr8jtc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403703627 19069 80.91.229.3 (25 Jun 2014 13:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2014 13:40:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 25 15:40:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WznQw-0004XZ-2Y for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Jun 2014 15:40:18 +0200 Original-Received: from localhost ([::1]:37824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WznQv-0001pL-M3 for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Jun 2014 09:40:17 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Injection-Info: mx05.eternal-september.org; posting-host="80f6b1c01f068ad28ca734314fbfaa28"; logging-data="11545"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pTukvH9+BOIE5sqJdHxA2" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:OCZz3nL1Dm2klBRHPBFzEYS/UsI= sha1:QeWo8zAt3ms1t0YuU5MD8gr7acI= Original-Xref: usenet.stanford.edu gnu.emacs.help:206119 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98389 Archived-At: >> Agreed. They also work OK for macros since those are not supposed to be >> executed at run-time. Keyword arguments are particularly problematic in >> Elisp where the language implementations are all fairly simplistic with >> very limited optimizations. > That might be a description of todays implementation. I would assume > that you could compile away the keyword parameters relativly easily: you > basically attach a define-compiler-macro (another CL macro) which maps > the keyword parameters to positional parameters. Of course, cl-lib does this kind of thing, but it's a lot of work, so it only covers some cases, and if you ever want to pass `member' to another function define-compiler-macro won't help you and you get a major performance penalty. I agree with you that naming arguments can be *very* helpful. But given the current state of Elisp implementation, using keyword arguments with functions that might be performance sensitive is not a good idea. Stefan