emacs-devel
[Top][All Lists]
Advanced

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

Re: moving more cl seq/mapping support into core


From: Daniel Colascione
Subject: Re: moving more cl seq/mapping support into core
Date: Fri, 01 Oct 2010 13:34:50 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

On 10/1/2010 4:42 AM, Richard Stallman wrote:
>     > Those are all rather heavy things by nature, so if the calling
>     > sequence is heavy too, that's ok.
>     > If I added a `remove-if' function I would like it not to be so heavy
>     > to use.
> 
>     You can use compiler-macros (or an equivalent) to create "fast" calls
>     when the keywords involved are known beforehand, as they almost always
>     are.
> 
> Indeed, one could do that.  However, that doesn't mean that it is
> unimportant to choose a good, convenient interface as the one we offer
> and document.

I understood the primary objection to keyword arguments being about
efficiency. Compiler macros solve that problem. If you instead want to
discuss the convenience of keyword arguments --- well, they're hard to
beat. Functions that take a large number of arguments with various
ad-hoc parameter meanings (I'm looking at you, write-region) are a
nightmare to use, and keyword argument would greatly simplify their use
(which is probably why play-sound takes keyword arguments).



reply via email to

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