From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: Fwd: [Patch] definitions in when, unless, do as well as in cond- and case-clauses Date: Sat, 5 Feb 2022 18:31:51 +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/alternative; boundary="000000000000d0a3fe05d748bea5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Feb 05 18:32:22 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 1nGOv7-0008pv-P1 for guile-devel@m.gmane-mx.org; Sat, 05 Feb 2022 18:32:21 +0100 Original-Received: from localhost ([::1]:39654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGOv6-00083f-Le for guile-devel@m.gmane-mx.org; Sat, 05 Feb 2022 12:32:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGOus-00083E-0q for guile-devel@gnu.org; Sat, 05 Feb 2022 12:32:06 -0500 Original-Received: from [2607:f8b0:4864:20::635] (port=34718 helo=mail-pl1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGOuq-0005aY-79 for guile-devel@gnu.org; Sat, 05 Feb 2022 12:32:05 -0500 Original-Received: by mail-pl1-x635.google.com with SMTP id h14so7883845plf.1 for ; Sat, 05 Feb 2022 09:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7jA37bIW2PK0dmLwRK3vcgwA3JcRZU04/EowQlpB02A=; b=FU0t/y50tbWZdvs04OwzlokQ4WO1u24DJDG9y0JYFAeKW3MIIMvUDfpttVHR35z7F7 YFulsiB3SMn63V272yMoRWRjTyVb30n2VPHjaQhmwOScX17Pl3WO8AdmfQEnHXHHtrMe fI0nBpizf7xUeMikQbAQQnXBs+EtlryEYjWLcwfM08ucrjp4D1Xd2geVUfWQvmu4gZRp tOVdjIxfE7H1tIKEI6oSJEGRxqC0i+8abmkxgOJm0AV7Eay1uM3hPeU4sgAO7cWD+oOL t2xztJZ6pzctMNsZtDWUT+YptbfjumazzdoT6cdBM7nV3eLCmfqSqTto4izPdBYmQ6lr idUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7jA37bIW2PK0dmLwRK3vcgwA3JcRZU04/EowQlpB02A=; b=Zegq3zNqLxUkRMNk0pzVjchzLw9Af8olWqdBz0Q4Q+kESfTmd1YuNNbqI722ufu8DH IxrsMO2vmupErJBPkBxsDkp8K8zPf8zrgnMfAqS+ehKz5Pl31+aD/AflHQqlh2isAnKn 55glQ9jG6WU9YpcgD9EKtDb+eI7+P1agLkS1kKwaYPZCikyzpdHvKo1VJjKQnEN2MvVV 20HL/sSGHFqZ2cX3XAC8SS3Y44X/7FGOgeLxaxJWJFzpjtv256Q9Evu73IZmbKYlNPWa HQAyyVZjvdMWO0mWBkq7nn0KqH9z/ltkpafEbbuG4KfSYWQeDFYt8+oVTDy0T9VsawS8 ZFrw== X-Gm-Message-State: AOAM531nGlUvVc7Q0ld+fVvc9CkGPeAb/VzxmSHJP451oa4/QgmsPdv9 eHrJPpjFj2Y46RYOg2HNDMyLFiZFi4X034I1uDo= X-Google-Smtp-Source: ABdhPJzFWE1hId7xIlrPUVLKjqpO8/8FQhKnVKoDLb8MZoRG/PBqPLVBJrGkgTaSC+gQdh1I6FijJVfquhfIF55+1Qk= X-Received: by 2002:a17:903:234e:: with SMTP id c14mr8880117plh.50.1644082322513; Sat, 05 Feb 2022 09:32:02 -0800 (PST) In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::635 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=stefan.itampe@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:21072 Archived-At: --000000000000d0a3fe05d748bea5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hmm this was wrong, I mean For conditional variables we have a default begin. So then why on earth do you not have an implicit let?, Just laziness? There should be a good reason or? this is a pretty fundamental change that I support but then we should not be lazy not trying to understand the design choices of the old beards. On Sat, Feb 5, 2022 at 11:55 AM Maxime Devos wrote= : > 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)))) > > > > > > (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 gave 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'. 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=98= why do > you not have an implicit let?=E2=80=99 has to do with =E2=80=98For condit= ional > 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. > --000000000000d0a3fe05d748bea5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm this=C2=A0was wrong, I mean

For con= ditional variables we have a default begin. So then why on earth do you not= have an implicit let?, Just laziness?
There should=C2=A0 be a good rea= son or? this is a pretty fundamental change that I support=C2=A0but then we= should not be lazy not trying to understand the design choices=C2=A0of the= old beards.

On Sat, Feb 5, 2022 at 11:55 AM Maxime Devos <maximedevos@telenet.be> wrot= e:
Hi,

> > (define foo 'bar) ;; <--- ^^^
> > (define-syntax foobar
> >=C2=A0 =C2=A0(syntax-rules (foo)
> >=C2=A0 =C2=A0 =C2=A0((_ foo)
> >=C2=A0 =C2=A0 =C2=A0 (begin (pk "it's a foo!") foo))=
> >=C2=A0 =C2=A0 =C2=A0((_ goo)
> >=C2=A0 =C2=A0 =C2=A0 (begin (pk "it's not a foo ..."= ) goo))))
> >
> > (define (zebra stripes)
> >=C2=A0 =C2=A0(if stripes
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0(define foo 'quux)) ;;=C2=A0 <--= - ###
> >=C2=A0 =C2=A0(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 imp= ly
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'.=C2=A0 Also, I don't see what the que= stion =E2=80=98why 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.
--000000000000d0a3fe05d748bea5--