From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by sourceware.org (Postfix) with ESMTPS id 499DF3858401 for ; Fri, 17 Sep 2021 07:00:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 499DF3858401 Received: from zimbra65-e11.priv.proxad.net (unknown [172.20.243.215]) by smtp1-g21.free.fr (Postfix) with ESMTP id AACEBB004EC; Fri, 17 Sep 2021 09:00:08 +0200 (CEST) Date: Fri, 17 Sep 2021 09:00:07 +0200 (CEST) From: phiroc@free.fr To: Per Bothner Cc: kawa@sourceware.org Message-ID: <1713055755.220998399.1631862007856.JavaMail.root@zimbra65-e11.priv.proxad.net> In-Reply-To: <07e807cf-c585-f35a-9cf0-eed36d157bd5@bothner.com> Subject: Re: define-syntax can only be used with local variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [78.196.108.109] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Win)/7.2.0-GA2598) X-Authenticated-User: phiroc@free.fr X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2021 07:00:12 -0000 Hi Per, thank you for you input.=20 The R7RS report says the following: "If the define-syntax occurs at the outermost level, then the global syntactic environment is extended by binding the keyword to the specified transformer, but previous expansions of any global binding for keyword remain unchanged. Otherwise, it is an internal syntax definition, and is local to the body in which it is defined. Any use of a syntax keyword before its corresponding definition is an error. In particular, any use that precedes an inner definition will not apply an outer definition." So, as far as I am concerned, Kawa's behavior is the norm: a previously-defined global variable can't be reset by a define-syntax. Case closed. Best regards, Philippe ----- Mail original ----- De: "Per Bothner" =C3=80: phiroc@free.fr Cc: kawa@sourceware.org Envoy=C3=A9: Vendredi 17 Septembre 2021 07:29:42 Objet: Re: define-syntax can only be used with local variables On 9/16/21 4:05 AM, phiroc--- via Kawa wrote: > Hi, > I've no idea. The Kawa Developers, if they are are reading this thread, m= ay be able to answer your question. The "Kawa developers" is mostly me, and I'm focused on other projects. The problem is because a new declaration for y is created. And that turned= out to be a kludge done to fix this: https://gitlab.com/kashell/Kawa/-/issues/4= 4 See the code in kawa/standard/set_b.java following // A kludge to treat interactive set! as similar to (re-)definition. It probably makes sense to remove this kludge - but then trace/untrace breaks for functions defined in a REPL. A better fix for issue 44 may be possible. Kawa is very focused on efficiency, compilation, and static analysis. A REPL where anything can be redefined is the opposite. Supporting both is difficult. --=20 =09--Per Bothner per@bothner.com http://per.bothner.com/