[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Always-true predicate?
From: |
Barry Fishman |
Subject: |
Re: Always-true predicate? |
Date: |
Wed, 17 Feb 2021 11:59:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On 2021-02-17 13:40:14 +01, Lars Ingebrigtsen wrote:
> 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.
Something symmetric would be:
(setq some-predicate (constantly nil))
Ignore seems more about its lack of effects rather than its return value.
--
Barry Fishman
- 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
- RE: [External] : Re: Always-true predicate?, Drew Adams, 2021/02/17