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: Andy Moreton
Subject: Re: 7 logical-xor implementations in source tree
Date: Tue, 23 Jul 2019 14:54:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Tue 23 Jul 2019, Basil L. Contovounesios wrote:

> Andy Moreton <address@hidden> writes:
>
>> On Tue 23 Jul 2019, Andreas Schwab wrote:
>>
>>> On Jul 23 2019, Andy Moreton <address@hidden> wrote:
>>>
>>>> Perhaps an `xor' special form in eval.c next to `and' and `or' ?
>>>
>>> There is no need for a special form since xor needs to evaluate all its
>>> arguments anyway.
>>
>> You are right for a two argument xor. However for a multi-argument xor,
>> the remaining arguments can be ignored after a second non-nil argument
>> is evaluated.
>
> No, xor must evaluate all of its arguments in all n-ary interpretations
> suggested so far:
>
> - Odd number of non-nil arguments
Agreed.

> - Exactly one non-nil argument
After two non-nil arguments have been evaluated, there is no need to
evaluate the remaining arguments.

    AndyM




reply via email to

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