[Top][All Lists]

[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.


reply via email to

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