[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, 23 Jul 2019 11:26:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
On Tue 23 Jul 2019, Mattias Engdegård wrote:
> 23 juli 2019 kl. 10.39 skrev Andy Moreton <address@hidden>:
>>
>> Is `logxor' what you are looking for ? Removing duplication would be
>> useful.
>
> Pretty sure he meant boolean (nil/non-nil) xor, not bitwise xor.
Yes. The naming of the bitwise operations `logand', `logior', `logxor'
and `lognot' is unfortunate.
> Some naïve suggestions:
>
> * Call it `xor', to go with `and' and `or'
> * Make it n-adic, taking at least 1 argument (since the operation has no
> identity)
> * Make it a function, so that it can be used with `apply' etc.
> * Give it a compiler macro, for efficient partial application
Perhaps an `xor' special form in eval.c next to `and' and `or' ?
AndyM
- Re: 7 logical-xor implementations in source tree, (continued)
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/22
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/24
- Re: 7 logical-xor implementations in source tree, Stefan Monnier, 2019/07/24
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/24
- Re: 7 logical-xor implementations in source tree, Mattias Engdegård, 2019/07/25
- Re: 7 logical-xor implementations in source tree, Paul Eggert, 2019/07/25
- Re: 7 logical-xor implementations in source tree, Mattias Engdegård, 2019/07/25
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 <=
- 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
- Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/24
Re: 7 logical-xor implementations in source tree, Basil L. Contovounesios, 2019/07/23
Re: 7 logical-xor implementations in source tree, Yuri Khan, 2019/07/23
Re: 7 logical-xor implementations in source tree, Juri Linkov, 2019/07/25
Re: 7 logical-xor implementations in source tree, Noam Postavsky, 2019/07/23
Re: 7 logical-xor implementations in source tree, Stefan Monnier, 2019/07/23