From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Docs for &optional and &rest arguments together Date: Thu, 31 Dec 2020 10:19:32 -0800 (PST) Message-ID: References: <87o8icq958.fsf@gnus.org> <877doyoa9g.fsf@gnus.org> <20201231112634.GA5158@tuxteam.de>> < Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="__160943877316658046abhmp0002.oracle.com" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13921"; mail-complaints-to="usenet@ciao.gmane.io" To: arthur miller , tomas@tuxteam.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 31 19:20:52 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 1kv2Z9-0003VG-RR for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 19:20:51 +0100 Original-Received: from localhost ([::1]:39224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv2Z8-0004TL-PM for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 13:20:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv2Y3-00041x-KT for emacs-devel@gnu.org; Thu, 31 Dec 2020 13:19:43 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:60884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv2Y1-0004Ik-1v for emacs-devel@gnu.org; Thu, 31 Dec 2020 13:19:42 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BVIEdBU091930; Thu, 31 Dec 2020 18:19:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type; s=corp-2020-01-29; bh=eLJZ4t3S1+68ECJfgIpe6KvowRFmLP7r3LimJcJB6lI=; b=CfMjhPFIMTWumOrLBR7gosua+MLhwJumEgVVD+9qnB4tAUTwbFzA2vMMjTrGeNQUo0ct Aw/48UjRDM2YqEeK13KG+Kvr5Gv5tav9MRgto8cA93CODAWCrBLXHfY0EGFnPpuygYgI 14zWKb0ISyF0SSQWcCyRULZU93S/hqmoHn7QZXNV5JLGMNkjOGx0oVV0rYL/lp6x5aDf O8X7EPHUlv6wj0alTCFF3a2hVRYaOjmOgrYr+acrpWG4rsGMIcA7S/yc6VtkUw4P44UT K/6DW2va51UgBkPIjq34RVxgWK9zlN26Jq8EvWZoCCL0efhBq3gTgHdku4g8jAYAxzCE RA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 35phm1jj9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 31 Dec 2020 18:19:35 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BVIB48O172968; Thu, 31 Dec 2020 18:19:35 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 35pf40fs8w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Dec 2020 18:19:35 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BVIJXTB001412; Thu, 31 Dec 2020 18:19:33 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9851 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012310112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9851 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012310112 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_MED=-2.3, 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:262191 Archived-At: --__160943877316658046abhmp0002.oracle.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable > I have glanced through though, maybe I am missing it. =20 Don't just glance. Give it the attention that it and your understanding bot= h deserve. If that CL doc didn't help you then I really suggest you sit dow= n, take it slowly, and reread carefully. =20 Both the Elisp doc and the CL doc about this are clear and complete, I thin= k. I suggest with respect that you're maybe just not paying enough attentio= n. =20 Don't be in a hurry. The info is there; just give it a chance - and another= read. =20 The CL link is not documentation, it is an essay, entire novel :-). But int= erestingly, that do not touch on that case either . I have glanced through = though, maybe I am missing it.=20 =20 > > I don't read it says both c and d are required > > when &rest is also used. >=20 > You just have to squint the other way .-) > They are not "required". They are provided -- in the call. It's just > that c is served first, d next, and all the rest (if any) goes to e: If someone finds the Elisp doc about lambda lists, I recommend consulting the Common Lisp doc (CLTL2) about it. Common Lisp lambda lists allow more stuff (&keys, &aux etc.), but for the things that Elisp has (&optional, &rest) the behavior is the same. The language in CLTL2 is quite precise. It too merits being read carefully, but I think it spells things out quite clearly. This is the section about lambda lists, which covers &optional and &rest: HYPERLINK "https://urldefense.com/v3/__https:/www.cs.cmu.edu/Groups/AI/html= /cltl/clm/node64.html*SECTION00922000000000000000__;Iw!!GqivPVa7Brio!PxyUBv= Vt3a4Eze6ZtyLlEC6A236XgfttZKnn-7gkT1H6p1FBymyit-C_eQf2-wZH$"https://www.cs.= cmu.edu/Groups/AI/html/cltl/clm/node64.html#SECTION00922000000000000000 With that, plus the Elisp doc, plus this thread, I think things will become more clear. HTH. --__160943877316658046abhmp0002.oracle.com Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable

> I have glan= ced through though, maybe I am missing it.

 

D= on't just glance. Give it the attention that it and your understandi= ng both deserve. If that CL doc didn't help you then I really suggest you s= it down, take it slowly, and reread carefully.

 

Both the Elisp doc and the CL doc about this are clear and complete= , I think. I suggest with respect that you're maybe just not paying enough = attention.

 <= /o:p>

Don't be in a hurry. The inf= o is there; just give it a chance - and another read.

=

 

The CL link is not documentation, it is an essay, entire n= ovel :-). But interestingly, that do not touch on that case either . I have= glanced through though, maybe I am missing it.

 

> > I d= on't read it says both c and d are required
> > when &rest is = also used.
>
> You just have to squint the other way .-)
&g= t; They are not "required". They are provided -- in the call. It'= s just
> that c is served first, d next, and all the rest (if any) go= es to e:

If someone finds the Elisp doc about lambda lists,
I rec= ommend consulting the Common Lisp doc (CLTL2)
about it.  Common Lis= p lambda lists allow more stuff
(&keys, &aux etc.), but for the = things that Elisp
has (&optional, &rest) the behavior is the sam= e.

The language in CLTL2 is quite precise.  It too
merits be= ing read carefully, but I think it spells
things out quite clearly.
<= br>This is the section about lambda lists, which covers
&optional an= d &rest:

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node64.html#SECTION009= 22000000000000000

With that, plus the Elisp doc, plus this threa= d,
I think things will become more clear.  HTH.

--__160943877316658046abhmp0002.oracle.com--