[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 7 logical-xor implementations in source tree
From: |
Basil L. Contovounesios |
Subject: |
Re: 7 logical-xor implementations in source tree |
Date: |
Thu, 01 Aug 2019 01:05:40 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Drew Adams <address@hidden> writes:
> I don't understand what all the excitement
> about defining an `xor' (with whatever name)
> operator is about.
>
> Common Lisp, like Emacs Lisp, has a bit-wise
> xor operator. That makes sense - useful.
>
> And Common Lisp, like Emacs Lisp, does _not_
> have an xor operator for arbitrary Lisp values.
>
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node75.html
>
> Why is it important that Emacs Lisp have such
> an operator? (Answer: it's not - YAGNI.)
If YAGNI, why are there currently 7 copies of this function in the Emacs
sources?
No-one said it's vitally important; it's just a minor nice-to-have.
> Is it hard to understand (eq (not a) (not b))?
> Is evaluation of that inefficient? Is it too
> verbose?
>
> What's the motivation for all of this?
Same reason proper-list-p was added: reducing existing code duplication
and providing yet another convenience function for those that like it.
> My vote's against adding any such operator.
--
Basil
- Re: 7 logical-xor implementations in source tree, (continued)
- 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
- 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 <=
- 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