[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 20:33:23 +0300
> From: Stefan Monnier <address@hidden>
> Date: Fri, 26 Oct 2018 12:04:11 -0400
> >> > 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.
"Feel"? The text refers to 'equal' explicitly, so it's not a feeling,
it's a fact.
> Would you feel the same if `pcase` always used `equal` and the
> optimization to `eql` were performed in the byte-compiler instead?
I don't know, and it's not really relevant, is it?
> > 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.
How about this:
Matches if EXPVAL is equal to the literal object. The equality
predicate depends on the type of the object; e.g., symbols are
compared using 'eq', and strings using 'equal'.