[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 7 logical-xor implementations in source tree
From: |
Michael Heerdegen |
Subject: |
Re: 7 logical-xor implementations in source tree |
Date: |
Wed, 31 Jul 2019 22:31:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Barry Fishman <address@hidden> writes:
> I question whether IFF is really that clear. If you want to be
> mathematical, just use <=> or ===, and can be complete by defining the
> => implementation operator also:
>
> (defun <=> (x y) (not (xor x y)))
>
> Or:
> (defun => (x y) (or (not x) y)
> (defun <=> (x y) (and (=> x y) (=> y x))
>
> At least mathematicians will be happy (and nix programmers).
Even as a mathematician I would hate the name `iff' when using it in
Elisp which is not a language for writing mathematical stuff but for
writing code. If you see something like
(iff EXPR1 EXPR2)
in code, how does it read? "If and only if evaluating EXPR1 yields
non-nil then - ehm ...??? eh - what? -- ah, ok, let's see, I remember,
it was just the negation of xor, so it actually means..." etc.
Terrible.
Michael.
- Re: 7 logical-xor implementations in source tree, (continued)
- Re: 7 logical-xor implementations in source tree, Andy Moreton, 2019/07/30
- 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 <=
- RE: 7 logical-xor implementations in source tree, Drew Adams, 2019/07/31
- RE: 7 logical-xor implementations in source tree, Drew Adams, 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, Drew Adams, 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, Marcin Borkowski, 2019/07/31
Re: 7 logical-xor implementations in source tree, Andy Moreton, 2019/07/23