From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel Subject: Re: Add internal definitions to derived forms Date: Mon, 23 Jan 2023 23:13:00 +0100 Message-ID: <87h6wgzyqb.fsf@gnu.org> References: <2f38c5ea-0cb6-494e-b680-70b39c3291fb@app.fastmail.com> <38A58B58-3E5C-48EA-A108-1255982789DF@sarc.name> <39109fe3-4f7f-8d07-51ba-f9f993ab5c0d@lassi.io> <8187541f-a4e0-2f26-e8b7-df7fb82bb9f0@lassi.io> <2ffeb6fa-87eb-4008-9881-91b3e71a1fc3@app.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11022"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: , Linus =?utf-8?Q?Bj=C3=B6rnstam?= , Lassi Kortela To: lloda Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Jan 23 23:13:40 2023 Return-path: Envelope-to: guile-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 1pK54N-0002bv-Mo for guile-devel@m.gmane-mx.org; Mon, 23 Jan 2023 23:13:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pK53s-0000qj-GI; Mon, 23 Jan 2023 17:13:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK53p-0000qP-St for guile-devel@gnu.org; Mon, 23 Jan 2023 17:13:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK53o-0000bp-F7; Mon, 23 Jan 2023 17:13:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=6HlgdlxDM9TMm2rq5vl/WbKtu5d2am6iRA9rgzCvogQ=; b=rSkMOIu0anMCsfK1vCuJ YFCyH+sj0qZd9WH/2VsXhMSttDJfRcLdNQ0mAHBXByeSbNhwe14Gbhhrf/XAUOJ81ohy+iLtTN4lt p1WJrzvUda+8msNAYTEb7xRnZ8RmA/oPKkOPWo2HywFRfX2OO3OqwOemveB3XyQxpgyh8tYLA/RGO vBCV6+ChDYEPUmq+AoGzEyn8dq0uTC8xhUGWKPO5w4jhky55ynLDr34aJLxWJAPzMgqz/9b4RmbU2 /Ma1jCVfUJAi4soAwE/nQYsHtlGfPc7GBw2SuomsLTu0rux+3SWWb47UBbs6JWFiDI2kfRdH2SFVo ANsqFROS5ZrctA==; Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK53m-0001gR-Eg; Mon, 23 Jan 2023 17:13:04 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 4 =?utf-8?Q?Pluvi=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Perce-neige X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: (lloda@sarc.name's message of "Fri, 20 Jan 2023 18:37:48 +0100") X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21619 Archived-At: Hi Daniel, Chiming in late in the discussion=E2=80=A6 lloda skribis: > From 7aea299373f7370f31c9701035260ad412763724 Mon Sep 17 00:00:00 2001 > From: Daniel Llorens > Date: Thu, 19 Jan 2023 16:23:29 +0100 > Subject: [PATCH 2/2] Fix documentation for forms taking lambda-like bodies > > * doc/ref/api-control.texi (Conditionals): Use 'body' in the syntax > description of when, unless, cond, case. > * doc/ref/api-binding.texi (Local Bindings): Normalize description of > body return values. > (Multiple values): Normalize use of 'body' and description of body > return values. What about: s/Fix documentation=E2=80=A6/doc: Document multiple-value returns in let, c= ond, etc./ ? (That would clarify what=E2=80=99s being fixed.) > +++ b/doc/ref/api-binding.texi > @@ -128,6 +128,8 @@ expressions has a few properties which are well worth= knowing. >=20=20 > The most basic local binding construct is @code{let}. >=20=20 > +@cindex body That=E2=80=99s not a great index entry because there=E2=80=99s no context. = Maybe: @cindex body, of a @code{let} expression ? > +with the special forms @code{when} and @code{unless}. As an added > +bonus, these forms take a @ref{Local Bindings,lambda-like body}, which c= an > +contain @ref{Internal Definitions,internal definitions} and multiple sta= tements > +to evaluate. =E2=80=9CLambda-like body=E2=80=9D is not defined; I guess it=E2=80=99s =E2= =80=9Clambda-like=E2=80=9D in the wrt. to local =E2=80=98define=E2=80=99, but it=E2=80=99s not =E2=80=9Clambd= a-like=E2=80=9D for the more crucial aspect of defining a procedure, so I=E2=80=99d avoid that phrase. WDYT? Also, @ref in the middle of sentences may render poorly in Info (info "(texinfo) @ref"). I=E2=80=99d suggest =E2=80=9C(@pxref{Whatever})=E2=80= =9D at the end of the sentence or proposition. > Each @code{cond}-clause must look like this: >=20=20 > @lisp > -(@var{test} @var{body} @dots{}) > +(@var{test} @var{body}) I think removing dots is incorrect here because it suggests, according to the typographic conventions used in the document, that there can only be a single expression. > @var{key} may be any expression, and the @var{clause}s must have the form >=20=20 > @lisp > -((@var{datum1} @dots{}) @var{body} @dots{}) > +((@var{datum1} @dots{}) @var{body}) Ditto. > and the last @var{clause} may have the form >=20=20 > @lisp > -(else @var{expr1} @var{body} @dots{}) > +(else @var{body}) Ditto. > -@deffn {library syntax} receive formals expr body @dots{} > +@deffn {library syntax} receive formals expr body Likewise. Otherwise LGTM; it=E2=80=99s certainly an improvement to have multiple-value returns properly documented! Thanks, Ludo=E2=80=99.