[Top][All Lists]

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

Re: [PATCH] What's the quickest way to contribute?

From: Dmitry Gutov
Subject: Re: [PATCH] What's the quickest way to contribute?
Date: Tue, 13 Jan 2015 05:57:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0

On 01/08/2015 08:59 PM, Oleh Krehel wrote:

Regarding this patch:

Finally, I attach one more patch that I'd like some feedback on.
I was browsing replace.el and found this type of code:

     (delq nil (mapcar #'(lambda (buf)
                           (when (buffer-live-p buf) buf))

instead of this:

     (cl-remove-if-not #'buffer-live-p bufs)

If this were my package, I would change it without batting an eye,
since the latter code is more clear and algorithmically faster.

Personally, I'd hesitate to make a change like this unless there's a semi-plausible scenario where this code is wrong (when a `buf' values could be nil), or where the change in performance could plausibly be noticed by a user. Since the number of buffers opened in Emacs is very unlikely to be high enough, probably not.

And the code reads well enough.

> Or maybe there's a policy of not fixing things that aren't broke.

Mostly this.

Using `cl-' functions is allowed, but I guess there remains some amount of prejudice against the CL coding style, and using those (more complicated) functions when simpler ones can work just as well.

reply via email to

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