[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: |
Stefan Monnier |
Subject: |
Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp? |
Date: |
Wed, 25 Jun 2014 09:35:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
>> 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
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, (continued)
- Message not available
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Barry Margolin, 2014/06/18
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Damien Cassou, 2014/06/18
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Phillip Lord, 2014/06/18
- Message not available
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Christoph Wedler, 2014/06/24
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Barry Margolin, 2014/06/24
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Stefan Monnier, 2014/06/24
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Leo Liu, 2014/06/25
- Message not available
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Stefan Monnier, 2014/06/25
- Message not available
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Christoph Wedler, 2014/06/25
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?,
Stefan Monnier <=
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Stefan Monnier, 2014/06/25
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Barry Margolin, 2014/06/25
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Robert Thorpe, 2014/06/25
- Message not available
- Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Pascal J. Bourguignon, 2014/06/18
Message not available
Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Barry Margolin, 2014/06/17
Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Stefan Monnier, 2014/06/25
Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?, Barry Margolin, 2014/06/26