From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Yuri Khan <yuri.v.khan@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: Docs for &optional and &rest arguments together
Date: Wed, 30 Dec 2020 19:54:39 +0700
Message-ID: <CAP_d_8WJHM_ZSH1Gw1AABRWiL7VfY1j35hSDEV1FbLRj8UtaRQ@mail.gmail.com>
References: <AM0PR06MB657709C899365FC0710F505496D80@AM0PR06MB6577.eurprd06.prod.outlook.com>
 <87o8icq958.fsf@gnus.org>
 <AM0PR06MB6577D086DD918C31A82C283F96D70@AM0PR06MB6577.eurprd06.prod.outlook.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="40718"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Emacs developers <emacs-devel@gnu.org>
To: Arthur Miller <arthur.miller@live.com>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 30 13:56:10 2020
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1kub1N-000AQ9-0s
	for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Dec 2020 13:56:09 +0100
Original-Received: from localhost ([::1]:41462 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1kub1M-0004au-09
	for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Dec 2020 07:56:08 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33454)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <yurivkhan@gmail.com>)
 id 1kub09-000447-0t
 for emacs-devel@gnu.org; Wed, 30 Dec 2020 07:54:53 -0500
Original-Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]:45276)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <yurivkhan@gmail.com>)
 id 1kub07-0001hI-Hc
 for emacs-devel@gnu.org; Wed, 30 Dec 2020 07:54:52 -0500
Original-Received: by mail-vs1-xe2a.google.com with SMTP id e20so8485329vsr.12
 for <emacs-devel@gnu.org>; Wed, 30 Dec 2020 04:54:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=O2jpVGoCM7ZuYaIFplNxbxBhqmqBAzJ4p0wkaU/kI0U=;
 b=eERfQQ9erV4muOFVLnNc88hAS4c/eGe3X0rRhHAM++Ykjr4Pscj93f/tiscQVkzOAi
 LgvV5I47I+H2SOmodeaeiSo9aRqPQDQdzNz1iqCzM9YENjuADzYaUI4VBv5Gr5m4BJGG
 d3li/VQePXSe/TUPEjalAD+9ME3HJ1IwwqPaTGPy1bO4WigEn9DhvykSaV9/se2gnpYn
 NzPzQY3PDSPGYqM19vPBObcg3g944JvQXKV5HDGK2XTi3RfpwukqjNnk9MKXPwHIpgTF
 eeL90c5ELb/aBqWUmmK60cccfek0s7ta3gu9lJjqsB5p1LbXs9oiZPNvFc2rEIAryEbH
 KgYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=O2jpVGoCM7ZuYaIFplNxbxBhqmqBAzJ4p0wkaU/kI0U=;
 b=mNJWZFHJYx8k5i8OGLzzjNpXgF6EZKXmTre7fwVwitWMNff0vPjbFR5+dUqCs6luFu
 HekOHhf7LjB2MpSPnwy7P8r9PC8M9FPu8gHwc6nJbRH5PX1se4Yhq57Z4GjnhXDciihK
 3ScoERK0flYfniviAROrC/kfRN98ZlA7Jfw50MULEAFr7MnKhjY0j8okul0XUbGyNXvC
 +zAQEfLmnbYIXyQcJJmZaKYQsAG+WiG/5t36ynTI4kZH2dPpy5bdG2xQgzlzConadOaS
 4WoouNw+wilQguT1ShbJEHVqiS1oCFFHsD5qBX1bXkFCrBgyiZgVEJf+AZmYxGOzl2u+
 y6dQ==
X-Gm-Message-State: AOAM530FypoMx5WYZVwnSE+aPQgCEtR9Kt+7efJBEN3QK/KJvbn/nvsI
 FbvxxCBkBn5Ul4gswN5NH4kpHDVZ+g1mBEWzKYA=
X-Google-Smtp-Source: ABdhPJyK4nv10PsP5DKaxcaB3BXAWNZd1JdipqNlDO9kL6Y0CJZtdF9LfXx5AfEFEK6JBgSA9eAbB3UkIalU9odK3KE=
X-Received: by 2002:a05:6102:2334:: with SMTP id
 b20mr32937540vsa.51.1609332890259; 
 Wed, 30 Dec 2020 04:54:50 -0800 (PST)
In-Reply-To: <AM0PR06MB6577D086DD918C31A82C283F96D70@AM0PR06MB6577.eurprd06.prod.outlook.com>
Received-SPF: pass client-ip=2607:f8b0:4864:20::e2a;
 envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2a.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:262124
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/262124>

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?