emacs-devel
[Top][All Lists]
Advanced

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

Re: 7 logical-xor implementations in source tree


From: Philippe Schnoebelen
Subject: Re: 7 logical-xor implementations in source tree
Date: Tue, 30 Jul 2019 12:57:58 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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



reply via email to

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