From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: RE: Docs for &optional and &rest arguments together Date: Thu, 31 Dec 2020 19:53:25 +0000 Message-ID: References: <87o8icq958.fsf@gnus.org> <877doyoa9g.fsf@gnus.org> <20201231112634.GA5158@tuxteam.de> , <87y2hdopbo.fsf@db48x.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_AM0PR06MB6577093685FBD535111B2ECD96D60AM0PR06MB6577eurp_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11633"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "tomas@tuxteam.de" , "emacs-devel@gnu.org" To: Daniel Brooks Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 20:55:05 2020 Return-path: 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 ) id 1kv42K-0002sq-Fd for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 20:55:04 +0100 Original-Received: from localhost ([::1]:41458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv42J-00015w-Hc for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 14:55:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv40o-0000Ny-AY for emacs-devel@gnu.org; Thu, 31 Dec 2020 14:53:30 -0500 Original-Received: from mail-vi1eur06olkn2012.outbound.protection.outlook.com ([40.92.17.12]:24346 helo=EUR06-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv40l-0003Wz-Q4 for emacs-devel@gnu.org; Thu, 31 Dec 2020 14:53:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L7iVLro2UQ9jGJpg68KyhPvx5Vb1d0IQ5r57pQ5KWhMC8vbhmVdt0G5IOP2M+Qd0mSoWYewzHN0a4QR8il4CV8os5Sd3nCllw3/Pgq0zFiHMGWncF89YTYeQjTd/dguglCjHvOvOFPflQp4f+DtpSQRnu30D5+cwN2DXnHWDI+5Z56ke3jHITigmYw5bHPjAG5wcbfu6ZpL6JGVo5wOA/+DiYK/Cajhgc1NnA6NUK3jyZw5VdJVxvSN6RkzYF2XpsHgIbVenhqjxJg/2Y/UoG/5eG2M6ONr3iGzcFlTX+Z5ApkgOAQtwRg0OS+oGGVSfo6TWvdoYY9lnNTYUoOsJmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a4dxYkIT+xtLn9MuKG6iCgTWGAeLu7bp60hTT2QO4cA=; b=HcCguDAGoAzQpXRR+okAl53Mad4xc3IEJ8IPm3c2goUm2DH3htdXre/YQmL1Ct8efmL415s94eJoeVNyZWp360LvZKXjZMQvAvv9H/dyqW6qpF88XoQGkfrUipw5nJ9wbqb1s5LvPFTdtXIsGIJlx7xGrqNIYgxR4CRU6/X8xac5rnO227iUNTvSQUJTlVeMcNX6XD4vcWHWEd9Jh+ZuFOE0IKnWeFgo8sGjpA/fWwJIEq1KVd4171n2WsSz/zjmnwW72LchbIcgVxpOWtqopK7H2ISr1tsve+MFwLA29LgKL5700hxji2WC7NbPTM3eIgY63f8fx5CYK5PYEDID4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a4dxYkIT+xtLn9MuKG6iCgTWGAeLu7bp60hTT2QO4cA=; b=Auhu4/VR66BZvwMM3YRwAcsmPGaqXSUi/4a0FEVdkZ7e+x0v/OafvS+p4Gb6C8ystCDknPrNF8DiCCK/ouR/JQcMiBCPihMWo7fNphlAW8+STwaToVDxX0+dgE+VANFAkTThJAWwufhHdnBzUZZILNjDxiAqPMeGGP+3JorzsECCqe9QVNQeiQx83V2JY96QFckESWy/JXw36XCqKrUP05TJN3y84vkkThFsyywWTbzIH0EV8ErIRsf7sj8HJr92P93teH2FfY0Q2UuFOIhVvIowVQOzW7TpOlDg9vikj5nZGglJQ4/F7FivxkTklCyMJDgE3xo+su+xpNBrnyA3wQ== Original-Received: from AM7EUR06FT008.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4b) by AM7EUR06HT239.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::364) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Thu, 31 Dec 2020 19:53:25 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:fc36::47) by AM7EUR06FT008.mail.protection.outlook.com (2a01:111:e400:fc36::498) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20 via Frontend Transport; Thu, 31 Dec 2020 19:53:25 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%7]) with mapi id 15.20.3700.031; Thu, 31 Dec 2020 19:53:25 +0000 Thread-Topic: Docs for &optional and &rest arguments together Thread-Index: AQHW3eY5w8c4C21GEEWOLQaTEmz/fKoQo1NHgAA1euaAADr9AIAAX3AIgAAGYPaAACfMVg== In-Reply-To: <87y2hdopbo.fsf@db48x.net> Accept-Language: sv-SE, en-US Content-Language: sv-SE x-incomingtopheadermarker: OriginalChecksum:C8F7B2204B8BF03418DC525BFE96D83DF0A4EF83F05B74A21B3BDFB07796F8BA; UpperCasedChecksum:5D6C71500ED884131C841AFC633F2889A6620C0D514C1B078D0BF35AFBCE5775; SizeAsReceived:7322; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [V11nQvubbdm8ZOwXguyBabgoEweqlPY1] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 606a187d-e455-44f5-8673-08d8adc5bc5a x-ms-traffictypediagnostic: AM7EUR06HT239: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I00c/69brpImUYPJ88aAuE2Et5UrSHmaOpnOEJgih2RBTtddQNArBANnU2zagzrEtkmtzSTAC+w+vS/xMa/hmzzHNT7nHdOqw17g2G21LSetIXf4II8EhURC5XQS1Wd4kzhXK05GqH5FJRreeTv84EN3/pegpyMu8hbLuEZRAZ947zEEgXisnDC8jLmnnPFmf1Rdj/l+EX4jnvNAt+kBWtvGql+QzsrLMj19MDSg/w8lGVX5qbnNO99UXVxtlHu2 x-ms-exchange-antispam-messagedata: LcZzReLcbS9g52vu985bEvCVuWeT6gsJi3f/3lVDYIYJM6ST1fKPtbuD0PivgOCl5yiMBepWlBdTwf2Yxf5Cmdd4GDRyf87JNarsSZg+0ZudgAO7pBwGonwMW5+Ni6fynx3WDh8c0rZcC5U+ZiIPag== x-ms-exchange-transport-forked: True X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT008.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 606a187d-e455-44f5-8673-08d8adc5bc5a X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Dec 2020 19:53:25.2101 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT239 Received-SPF: pass client-ip=40.92.17.12; envelope-from=arthur.miller@live.com; helo=EUR06-VI1-obe.outbound.protection.outlook.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262198 Archived-At: --_000_AM0PR06MB6577093685FBD535111B2ECD96D60AM0PR06MB6577eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Jepp. I come on that after I sent first mail and didn't wanted to complicat= e more later. I don't think docs mention it properly. -------- Originalmeddelande -------- Fr=E5n: Daniel Brooks Datum: 2020-12-31 18:30 (GMT+01:00) Till: arthur miller Kopia: tomas@tuxteam.de, emacs-devel@gnu.org =C4mne: Re: Docs for &optional and &rest arguments together arthur miller writes: > It Is flera f=F6r me hos it work. What I am saying is that docs does not > say that we can't omit "optional" c or d when &rest is used. In the > examples you are illustrating with, one can't omit say d and write > (foo a b c e), both c and d are required, so user has to pass > explicitly at least nil if not d is provided: (foo a b c nil e) It has the same behavior even when there is no &rest argument. The caller cannot omit argument c while still supplying argument d without inserting a nil: (foo a b d) vs (foo a b nil d). Both c and d are _optional_, because the caller deson't have to supply them. But it does have to supply the earlier ones if it wants to supply the later ones. db48x --_000_AM0PR06MB6577093685FBD535111B2ECD96D60AM0PR06MB6577eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Jepp. I come on that after I sent first mail and didn't w= anted to complicate more later. I don't think docs mention it properly.


-------- Originalmeddelande --------
Fr=E5n: Daniel Brooks <db48x@db48x.net>
Datum: 2020-12-31 18:30 (GMT+01:00)
Till: arthur miller <arthur.miller@live.com>
Kopia: tomas@tuxteam.de, emacs-devel@gnu.org
=C4mne: Re: Docs for &optional and &rest arguments together

arthur miller <arthur.miller@live.com> write= s:

> It Is flera f=F6r me hos it work. What I am saying is that docs does n= ot
> say that we can't omit "optional" c or d when &rest is u= sed. In the
> examples you are illustrating with, one can't omit say d and write
> (foo a b c e), both c and d are required, so user has to pass
> explicitly at least nil if not d is provided: (foo a b c nil e)

It has the same behavior even when there is no &rest argument. The
caller cannot omit argument c while still supplying argument d without
inserting a nil: (foo a b d) vs (foo a b nil d). Both c and d are
_optional_, because the caller deson't have to supply them. But it does
have to supply the earlier ones if it wants to supply the later ones.

db48x
--_000_AM0PR06MB6577093685FBD535111B2ECD96D60AM0PR06MB6577eurp_--