[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 7 logical-xor implementations in source tree
From: |
Andy Moreton |
Subject: |
Re: 7 logical-xor implementations in source tree |
Date: |
Tue, 30 Jul 2019 12:28:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (windows-nt) |
On Tue 30 Jul 2019, Philippe Schnoebelen wrote:
> On 2019/07/30 11:36, Alan Mackenzie wrote:
>> Less importantly, I don't like iff being used in this way. I'm not sure
>> why.
>
> Pros: (1) short (like and & xor)
>
> (2) exactly what we mean when writing assertions in code
>
> e.g. (cl-assert (iff (listp arg) (listp res)))
>
> e.g. (should (iff (= b (max a b)) (<= a b) ))
>
> Cons: (1) name not known outside of mathematicians;
>
> (2) is an acronym
>
> (3) is not purely boolean, has order of evaluation, allows
> side-effects (like and & or)
>
> --Philippe
Please do not add `iff' as a symbol under any circumstance.
Short names must be universally understood by readers of the code with a
wide range of expertise and experience. A short name must also be needed
due to frequent use in typical code. This usage meets neither test.
AndyM
- Re: 7 logical-xor implementations in source tree, (continued)
- Re: 7 logical-xor implementations in source tree, Stefan Monnier, 2019/07/24
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/24
- Re: 7 logical-xor implementations in source tree, Mattias Engdegård, 2019/07/25
- Re: 7 logical-xor implementations in source tree, Paul Eggert, 2019/07/25
- Re: 7 logical-xor implementations in source tree, Mattias Engdegård, 2019/07/25
- Re: 7 logical-xor implementations in source tree, Philippe Schnoebelen, 2019/07/28
- Re: 7 logical-xor implementations in source tree, Alan Mackenzie, 2019/07/28
- Re: 7 logical-xor implementations in source tree, Marcin Borkowski, 2019/07/28
- Re: 7 logical-xor implementations in source tree, Alan Mackenzie, 2019/07/30
- Re: 7 logical-xor implementations in source tree, Philippe Schnoebelen, 2019/07/30
- Re: 7 logical-xor implementations in source tree,
Andy Moreton <=
- Re: 7 logical-xor implementations in source tree, Stefan Monnier, 2019/07/30
- Re: 7 logical-xor implementations in source tree, Barry Fishman, 2019/07/30
- Re: 7 logical-xor implementations in source tree, Richard Stallman, 2019/07/30
- Re: 7 logical-xor implementations in source tree, Barry Fishman, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Stefan Monnier, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Michael Heerdegen, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Mattias Engdegård, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/31
- Re: 7 logical-xor implementations in source tree, Michael Heerdegen, 2019/07/31