From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: Re: Fwd: [Patch] definitions in when, unless, do as well as in cond- and case-clauses Date: Sat, 05 Feb 2022 11:55:07 +0100 Message-ID: References: <7f58438c-f2fb-49b6-b7b0-22054fde6277@www.fastmail.com> <38a7683ab39f412cd6f5b137d2f6ebd6f5410c5e.camel@telenet.be> <8db379b94c9d724c833478db7e6e8a6a4f379f69.camel@telenet.be> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+wUrKY8Fa35VtHbrzxHo" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12888"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 Cc: guile-devel To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Feb 05 11:56:44 2022 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 1nGIkE-00038J-7y for guile-devel@m.gmane-mx.org; Sat, 05 Feb 2022 11:56:42 +0100 Original-Received: from localhost ([::1]:38332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGIkD-0002DA-2E for guile-devel@m.gmane-mx.org; Sat, 05 Feb 2022 05:56:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGIj4-0001u4-Ba for guile-devel@gnu.org; Sat, 05 Feb 2022 05:55:36 -0500 Original-Received: from [2a02:1800:120:4::f00:15] (port=44520 helo=andre.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGIiw-0006QZ-ME for guile-devel@gnu.org; Sat, 05 Feb 2022 05:55:26 -0500 Original-Received: from [172.20.10.9] ([188.189.241.204]) by andre.telenet-ops.be with bizsmtp id rNvC260094RJVgC01NvHew; Sat, 05 Feb 2022 11:55:18 +0100 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644058518; bh=2P3C0AXJK2OOEmDB2OSxhRMffTeDc3LaAfXQHMrfW4o=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=EKgN5SBAi438T1/LHACU74GIEB+aRW9mN2xE0F26UPyfB+ouWV5ziUIcaUk8Colm9 KRf68UoZET+5ZM1EfDuyjeQvkJwFRy3kSACHJGZqJsY1aWI0Pu6eUk80OB+uj4sk/e ktvm+mCrtvjPfbl2mZF6Fx3wnVuMtjo/xmQy5bnYL+C1EQMqlqQuWvgKDpdVa6PoDY jMMvfZOZVNZtytLaAIqAq2qFStUJr5Th5YB7bVaB4ys2uKwp/NWoO4Z9kmfy+Ksrr0 JXrI1KUFXtY6xtmnZWm5Bi9+XfsoCQLOLWAvg5oZbA4cAN5VTTwflXOl6kNtqJsEgI KO9H6EJxSpkAw== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.lisp.guile.devel:21071 Archived-At: --=-+wUrKY8Fa35VtHbrzxHo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, > > (define foo 'bar) ;; <--- ^^^ > > (define-syntax foobar > > (syntax-rules (foo) > > ((_ foo) > > (begin (pk "it's a foo!") foo)) > > ((_ goo) > > (begin (pk "it's not a foo ...") goo)))) > >=20 > > (define (zebra stripes) > > (if stripes > > (define foo 'quux)) ;; <--- ### > > (foobar foo)) ;; <--- *** Stefan Israelsson Tampe schreef op za 05-02-2022 om 02:14 [+0100]: > For conditional variables you=C2=A0gave a default value. I don't understand the question, I didn't give a default value? The variable 'foo' (^^^) is a different variable from 'foo' (###) since 'foo' (^^^) is a module variable, and 'foo' (###) is a local variable in 'zebra'.=C2=A0 Merely having the same name does not imply being the same variable, c.f. shadowing, so '^^^' does _not_ give a default value to the 'foo' in '###'. (If '###' was 'set!' instead of 'define', then the two variables would have been the same.) > So then why on earth do you not have an implicit let ? > There must be a good reason. I don't understand the question, there's an implicit 'let' here: the definition of 'zebra'. Also, I don't see what the question =E2=80=98wh= y do you not have an implicit let?=E2=80=99 has to do with =E2=80=98For conditio= nal variables you gave a default value.=E2=80=99. Also, AFAICT these questions don't seem to have anything to do with the macro system problems I noted? Greetings, Maxime. --=-+wUrKY8Fa35VtHbrzxHo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYf5XixccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jLRAQCXX8U48rWtgzW74jwxhWwTmNq4 JZw4prvSt/6iD2KqTAEA4/pgQgX7cFV6uratRIvOlz+KTgjhOnColB15unJGJw4= =1LM1 -----END PGP SIGNATURE----- --=-+wUrKY8Fa35VtHbrzxHo--