bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24362: 25.1.50; Inconsistent docstring between pcase-let and pcase-l


From: Drew Adams
Subject: bug#24362: 25.1.50; Inconsistent docstring between pcase-let and pcase-let*
Date: Thu, 15 Sep 2016 15:00:15 -0700 (PDT)

> > This patch changes the pcase-let* docstring to match the pcase-let
> > docstring, but IMO I don't think that the phrase 'a list of
> > expressions' is exactly the right term for this. That (to me) implies
> > that we are wrapping the whole body in a list, which you don't.
> 
> Isn't this just normal "Elisp speak" for a &rest parameter?  Sure, the
> value of the parameter doesn't appear in the code (only "spliced in") -
> but we use this wording all the time.

An &rest formal parameter corresponds to a list of actual arguments
in the calling sequence.

Consider (defun foo (&rest xs) (message "Args: %S" xs)).

At runtime, XS is the only argument that you can access by name -
the only argument whose value is bound to a variable.

And yes, its value at runtime, i.e., in any actual call, is a list.

On the other hand, not only (foo 1 2) but also (funcall #'foo 1 2)
treat 1 and 2 as actual arguments.  The list (1 2) does not appear
explicitly in these calling sequences.

So if you are talking about `foo's actual arguments for such a call
then you can say they are 1 and 2.  But if you are talking about the
value of the &rest argument XS for such a call then you must say
that the value is a list.





reply via email to

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