[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 9dd95bf: * lisp/emacs-lisp/pcase.el (pcase--u1)
Re: [Emacs-diffs] master 9dd95bf: * lisp/emacs-lisp/pcase.el (pcase--u1): Fix bignums
Fri, 26 Oct 2018 12:04:11 -0400
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
>> > Stefan, this change needs a suitable change in the docs (both the doc
>> > string and the ELisp manual): they still claim integers are compared
>> > using 'equal', which AFAIU is now inaccurate.
>> AFAIK using `eql` gives the same result as comparing with `equal`:
>> It's just an internal optimization that is transparent to the user.
> That's so, but I find documentation that explicitly calls out 'equal'
> misleading when the code actually invokes 'eql' instead.
I don't understand why you feel that way.
Would you feel the same if `pcase` always used `equal` and the
optimization to `eql` were performed in the byte-compiler instead?
> Maybe we should make the text less explicit then?
I can't think of any way to make the text less explicit without making
it either too vague or a lot more verbose. The semantics we want to
promise to the user is exactly that of `equal`, so we'd have to
say something like
it'll behave like `equal` tho it might use something equivalent
under the hood anyway
which seems just more verbose with no clear benefit.
To be clear, I'm not opposing such a change: it'd make the doc worse for
me, but I'm ill-placed to judge what's best for the other readers.