[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
- Always-true predicate?, Lars Ingebrigtsen, 2021/02/17
- Re: Always-true predicate?, Andrea Corallo, 2021/02/17
- Re: Always-true predicate?, Basil L. Contovounesios, 2021/02/17
- Re: Always-true predicate?, Pip Cet, 2021/02/17
- Re: Always-true predicate?, Lars Ingebrigtsen, 2021/02/17
- Re: Always-true predicate?, Pip Cet, 2021/02/17
- Re: Always-true predicate?, Lars Ingebrigtsen, 2021/02/17
- Re: Always-true predicate?, Teemu Likonen, 2021/02/17
- RE: [External] : Re: Always-true predicate?, Drew Adams, 2021/02/17
- Re: [External] : Re: Always-true predicate?, Basil L. Contovounesios, 2021/02/17