[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: 7 logical-xor implementations in source tree
From: |
Drew Adams |
Subject: |
RE: 7 logical-xor implementations in source tree |
Date: |
Wed, 31 Jul 2019 16:20:57 -0700 (PDT) |
> > 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?
Dunno. I probably wouldn't have added them.
OK, so we have 7 definitions of a trivial function.
How many occurrences of those 7 functions? Do their
uses really benefit from defining such a function?
(How about just replacing all of them by sexps?)
> No-one said it's vitally important; it's just a minor nice-to-have.
Just 1 opinion: too minor and not nice enough 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.
I see. You added `proper-list-p' also. Also missing
from Common Lisp, FWIW.
How much real code duplication did adding that predicate
eliminate? At least in that case the code replaced is,
even if straightforward and not very verbose, not
completely trivial.
I don't object strongly to adding such functions.
But I'd expect a convenience function to typically be
more convenient - replace more than a few occurrences
of more complex code.
- Re: 7 logical-xor implementations in source tree, (continued)
- 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, 2019/07/31
- RE: 7 logical-xor implementations in source tree,
Drew Adams <=
- 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
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Mattias EngdegÄrd, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Andy Moreton, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Andreas Schwab, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Andy Moreton, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/23
- Re: 7 logical-xor implementations in source tree, Andy Moreton, 2019/07/23