emacs-devel
[Top][All Lists]
Advanced

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

Re: Docs for &optional and &rest arguments together


From: Yuri Khan
Subject: Re: Docs for &optional and &rest arguments together
Date: Wed, 30 Dec 2020 19:54:39 +0700

On Wed, 30 Dec 2020 at 19:20, Arthur Miller <arthur.miller@live.com> wrote:

> Which part of the doc does it say that &optional argument when
> used together with &rest, makes &optional argument mandatory, i.e. can
> not be ommitted when calling a function or macro?

Imagine If This Were Possible:

    (defun foo (bar &optional baz &rest quux)
      "doc"
      nil)  ;; the body is not important

    (foo 3.14 42)       ;; intending baz = 42, quux = nil
    (foo 3.14 "xyzzy")  ;; intending baz = nil, quux = ("xyzzy")

How would the interpreter decide whether you wanted to omit the
&optional argument or the &rest argument?



reply via email to

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