emacs-devel
[Top][All Lists]
Advanced

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

Re: Always-true predicate?


From: Lars Ingebrigtsen
Subject: Re: Always-true predicate?
Date: Wed, 17 Feb 2021 13:40:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Andrea Corallo <akrl@sdf.org> writes:

> Maybe something like CONSTANTLY would be more generic?
>
> <http://www.lispworks.com/documentation/HyperSpec/Body/f_cons_1.htm>

I'm not sure that's a net win.  The use case here is, for instance

(defalias 'mouse-sel--ignore #'ignore)
(defvar after-focus-change-function #'ignore

etc, which is fast and easy to read.  If you're doing a predicate, you
now have to say

(setq some-predicate #'ignore)

but

(setq some-predicate (lambda (&rest _) t))

or

(setq some-predicate (constantly t))

which seems unsymmetric.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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