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: Basil L. Contovounesios
Subject: Re: 7 logical-xor implementations in source tree
Date: Thu, 25 Jul 2019 00:44:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> It also includes Mattias' equiv suggestion.
>
> Not convinced about this one:
> - The name is too much like "equal/eq/eql": we need something much
>   more explicit to avoid adding to the already existing confusion.
>   I'd go with something like `bool-equal`.

Fine by me, but see my comment about xnor below.

> - The fact that it's not a function is a definite downside.

Sure, though I'm interested to hear arguments to the contrary.

> - There's no use for it, currently.  If we can't find any use for it,
>   I'm not sure it deserves to be in subr.el.
>   Actual/potential uses of it might also help figure out if having it as
>   a function would be beneficial/useful and whether the detail about
>   which non-nil value is returned is important and whether supporting
>   more than 2 args is important.

The patch uses equiv in two places.  In both cases it is equivalent to a
dyadic xnor function.  My original patch had provided dyadic xor and
xnor functions, so I'm happy either way.

Of course, we could also just provide a dyadic xor and use its negation
in place of the two equiv occurrences; then the xor parts of the patch
could be pushed sooner, and the relative merits of the equiv parts
discussed further, as you suggest.

Thanks,

-- 
Basil



reply via email to

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